search bar on website in footer

I have this search bar code. Unfortunately, it opens up the search in the same page. I’d like it to open another page so that my client can click back to the page they were on and will not lose their space. What do I need to change in the code in order to make the search open up a new page?

Thanks in advance!!
Amy

I believe that’s the older code for Google Custom Search…

You should just switch it to the new code, which has the options you’re looking for.

[php]<gcse:searchbox-only resultsUrl=“http://www.example.com” newWindow=“true” queryParameterName=“search”>[/php]

You can read on on the documentation here and implement it, It’s straight forward.

https://developers.google.com/custom-search/docs/element

Sponsor our Newsletter | Privacy Policy | Terms of Service