user730077
user730077

Reputation: 209

Text Field for Google Search in the Website

I am developing a simple website and I want to add Google Search to the website. I created a simple box and add Google Search to it, so when anyone wants to search about something, he just needs to write in that box and then he will be directed to Google Search Results page. The problem is I want to show the Google Search Results page in a new browser window or tab instead of loading it in the same browser window. So how can I do that?

My Code:

<div id="search"> <input type="text" value="Search"> <a href="#"><img src="images/go.gif" alt="" width="26" height="26" /></a> </div>

Upvotes: 1

Views: 648

Answers (1)

Stephane Gosselin
Stephane Gosselin

Reputation: 9148

You need the custom search api

You can use the JSON/Atom Custom Search API to retrieve Google Custom Search results from your custom search engine programmatically.

Like all google api's, it's well documented and has some examples to get you started.

Happy coding!

Upvotes: 2

Related Questions