Question

I am using the two page look and feel, i.e. Search bar on one page, results on another.

I have one search bar in my header, when I search for something it takes me to a new page for the results to be shown. The problem is, when I get to the new page, there is ANOTHER search bar. So now i have two search bars on the same page, which do the same thing.

Is there a way to remove the second search bar?

Was it helpful?

Solution

Yup. Somewhere in your JavaScript you'll be creating a DrawOptions object:

var options = new google.search.DrawOptions();

After this line add this one:

options.enableSearchResultsOnly();

Which will get rid of the search box. However the problem I'm having is that the search box in the header (the one you do want) doesn't have the query term in it.

BTW, here's a link to the JavaScript API reference

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top