Gravatar for yyogesh1990@gmail.com

Question by yyogesh1990@gmail.com, Feb 12, 2019 12:26 PM

Need to reload the page on click of search button when you are on search result page

I am using Coveo for sitecore 4.1 and I have added Coveo Gobal search box in header now if I am not on search result page and typing any keyword in search text and clicking on search button then it is redirecting me to search result page. That is working perfect but in my case I need to reload the page with new query keyword if I am already on search result page.

Right now it is just updating query to query string on click of search button if you are on search result page.

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Feb 12, 2019 12:59 PM

Updating the query string is the intended way the Search Box, Search Interface are working.

It works this way for any JavaScript library that leverages query string parameters.

What exactly are you trying to achieve here? Why do you want to change this behavior?

Gravatar for yyogesh1990@gmail.com

Comment by yyogesh1990@gmail.com, Feb 12, 2019 1:15 PM

I just want to reload my page when I am searching on search result page.

Why I need this - In my case search box is opening in Modal window (Pop-up). So once I hit the search button I need to close the modal window and I can't see any way to control the search button. I thought if I can reload the page after searching will close the modal window automatically.

0 Reply
Ask a question