Categories: Implementation :

How do I submit a search box from a different page to my Google CSE page?

Showing 1-3 of 3 messages
How do I submit a search box from a different page to my Google CSE page? Brandon Rohde 4/25/12 11:35 AM
I have a paid Google CSE.  So far the implementation went super well...just past the code into my mydomain.com/search/ and I am good to go.  However, there are a couple questions I have.

1) How do I create just a search box on the top of each page to use this search?  The only solution I could find so far does a search for my site but on google's domain.  I just need to know what parameters to send it.

2) Is there a way to have my CSE page update the URL with the variables for the search?  Essentially, submit the query using GET? I want our tech support department to be able to copy/paste the search query URL to customers who have questions on something.

Thanks
Re: How do I submit a search box from a different page to my Google CSE page? omr 4/25/12 6:17 PM

Try the following:

Create a results page on your web site.  (In one of the following steps you'll add code to display Custom Search results on that page.)

Go to the CSE control panel, click "Look and feel" in the sidebar, select the (so-called) "Two page" layout option, and click the "Save & Get Code" button.

In the first text box under the heading "Specify search results details", enter the URL of your results page.

Use the first provided code snippet for your search box(es) (e.g., in your page header).

Place the second provided code snippet at the location where you wish to display search results on your results page.

The "two page" layout's results code will display a second search box above search results.  If you've placed a search box in the page header, the second search box above the results may be redundant.  You can proceed as follows if you wish to remove the second search box:

Go to the CSE control panel, click "Look and feel" in the sidebar, select the "Results only" layout option, click the "Save & Get Code" button, and use the provided code on your results page (replacing the previously installed results code).

-- omr

Re: How do I submit a search box from a different page to my Google CSE page? Marcom RAKCeramics 4/25/13 1:41 AM
Hi,
I have exactly done what you have told in the above,and i have put the results code in my website layout page, but the results show in a different page other than my website template page.

pls. help me solving this issue.

Thanks