[Skip to main content](#vessel-content)

#   Prevent page jumping up to top when using filter

##

- **[Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")**
- [![Lexnia's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28370.jpg)](/forum/user/28370-lexnia "View Lexnia's Profile") Topic Author
- [ Offline](/forum/user/28370-lexnia)

Less More

- Posts: 52
- Thank you received: 2
-
-

12 years 9 months ago [\#143745](#143745) by [Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")  *[Prevent page jumping up to top when using filter](/forum/45-filters-search/865820-prevent-page-jumping-up-to-top-when-using-filter#143745 "Hi,  I need some help to stop the page from jumping to the top when someone selects their filter options and clicks on 'Filter' to submit.  I've tried to make it submit as soon as someone selects a filter option without having to click on the 'Filter' button to submit the search, but that makes it jump to the top as well.  Is there any way of making it stay a certain length down the page (e.g. by using a #top link within the php which controls where the page goes after filtering)? I've already used the #top tag to make the drop-down box stay a certain length down the page when someone clicks on it to drop down the filter box, but as mentioned, once someone then selects the filter options it jumps to the top of the page when displaying the filter results.  See problem here:   s293983206.websitehome.co.uk/elevatefile...age(1)/women-s-shoes  Please help :S")* was created by *[Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")*

Hi,

I need some help to stop the page from jumping to the top when someone selects their filter options and clicks on 'Filter' to submit.

I've tried to make it submit as soon as someone selects a filter option without having to click on the 'Filter' button to submit the search, but that makes it jump to the top as well.

Is there any way of making it stay a certain length down the page (e.g. by using a #top link within the php which controls where the page goes after filtering)? I've already used the #top tag to make the drop-down box stay a certain length down the page when someone clicks on it to drop down the filter box, but as mentioned, once someone then selects the filter options it jumps to the top of the page when displaying the filter results.

See problem here: [ s293983206.websitehome.co.uk/elevatefile...age(1)/women-s-shoes](http://s293983206.websitehome.co.uk/elevatefiles/Joomla_3.1.5-Stable-Full_Package(1)/women-s-shoes)

Please help :S

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NTgyMC1wcmV2ZW50LXBhZ2UtanVtcGluZy11cC10by10b3Atd2hlbi11c2luZy1maWx0ZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 9 months ago [\#143856](#143856) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Prevent page jumping up to top when using filter](/forum/45-filters-search/865820-prevent-page-jumping-up-to-top-when-using-filter#143856 "Hi,  I need some help to stop the page from jumping to the top when someone selects their filter options and clicks on 'Filter' to submit.  I've tried to make it submit as soon as someone selects a filter option without having to click on the 'Filter' button to submit the search, but that makes it jump to the top as well.  Is there any way of making it stay a certain length down the page (e.g. by using a #top link within the php which controls where the page goes after filtering)? I've already used the #top tag to make the drop-down box stay a certain length down the page when someone clicks on it to drop down the filter box, but as mentioned, once someone then selects the filter options it jumps to the top of the page when displaying the filter results.  See problem here:   s293983206.websitehome.co.uk/elevatefile...age(1)/women-s-shoes  Please help :S")*

Hi,

You can use an anchor in the filter form.
Otherwise, because you submit a form and reload the page, you got a new page so... globally except with a anchor it is not possible.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NTgyMC1wcmV2ZW50LXBhZ2UtanVtcGluZy11cC10by10b3Atd2hlbi11c2luZy1maWx0ZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")**
- [![Lexnia's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28370.jpg)](/forum/user/28370-lexnia "View Lexnia's Profile") Topic Author
- [ Offline](/forum/user/28370-lexnia)

Less More

- Posts: 52
- Thank you received: 2
-
-

12 years 9 months ago [\#143930](#143930) by [Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")  Replied by *[Lexnia](/forum/user/28370-lexnia "View Lexnia's Profile")* on topic *[Prevent page jumping up to top when using filter](/forum/45-filters-search/865820-prevent-page-jumping-up-to-top-when-using-filter#143930 "Hi,  I need some help to stop the page from jumping to the top when someone selects their filter options and clicks on 'Filter' to submit.  I've tried to make it submit as soon as someone selects a filter option without having to click on the 'Filter' button to submit the search, but that makes it jump to the top as well.  Is there any way of making it stay a certain length down the page (e.g. by using a #top link within the php which controls where the page goes after filtering)? I've already used the #top tag to make the drop-down box stay a certain length down the page when someone clicks on it to drop down the filter box, but as mentioned, once someone then selects the filter options it jumps to the top of the page when displaying the filter results.  See problem here:   s293983206.websitehome.co.uk/elevatefile...age(1)/women-s-shoes  Please help :S")*

Thanks for your response Jerome. ![:-)](/media/kunena/emoticons/3.png ":-)")

Can I just ask one more question... sorry to be a pain. How shall I include the anchor within the php of the form so that it returns the new page from the anchor point onwards?

Thanks in advance ![:-)](/media/kunena/emoticons/3.png ":-)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NTgyMC1wcmV2ZW50LXBhZ2UtanVtcGluZy11cC10by10b3Atd2hlbi11c2luZy1maWx0ZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

12 years 9 months ago [\#143987](#143987) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Prevent page jumping up to top when using filter](/forum/45-filters-search/865820-prevent-page-jumping-up-to-top-when-using-filter#143987 "Hi,  I need some help to stop the page from jumping to the top when someone selects their filter options and clicks on 'Filter' to submit.  I've tried to make it submit as soon as someone selects a filter option without having to click on the 'Filter' button to submit the search, but that makes it jump to the top as well.  Is there any way of making it stay a certain length down the page (e.g. by using a #top link within the php which controls where the page goes after filtering)? I've already used the #top tag to make the drop-down box stay a certain length down the page when someone clicks on it to drop down the filter box, but as mentioned, once someone then selects the filter options it jumps to the top of the page when displaying the filter results.  See problem here:   s293983206.websitehome.co.uk/elevatefile...age(1)/women-s-shoes  Please help :S")*

You would have to edit the file "filter" of the view "product" via the menu Display&gt;views and change the line: Code:

&lt;form action="&lt;?php echo $url; ?&gt;" method="post" name="&lt;?php echo 'hikashop_filter_form_' . $this-&gt;params-&gt;get('main_div_name'); ?&gt;" enctype="multipart/form-data"&gt;

to something like that: Code:

&lt;form action="&lt;?php echo $url; ?&gt;#myanchor" method="post" name="&lt;?php echo 'hikashop_filter_form_' . $this-&gt;params-&gt;get('main_div_name'); ?&gt;" enctype="multipart/form-data"&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2NTgyMC1wcmV2ZW50LXBhZ2UtanVtcGluZy11cC10by10b3Atd2hlbi11c2luZy1maWx0ZXI/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.047 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
