By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,537 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,537 IT Pros & Developers. It's quick & easy.

redirecting to google

P: n/a
I am creating a webpage for my office. The start page is a search
engine that searches a company database.
it consists of a text box and a button called search.

I was wondering if i could add another button that would say 'Search
Internet' and if the user selects this redirect to google or yahoo or
whatever given keywords that they enterd in the text box.

thanks
redhanz

Jan 9 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

je**********@gmail.com wrote:
I am creating a webpage for my office. The start page is a search
engine that searches a company database.
it consists of a text box and a button called search.

I was wondering if i could add another button that would say 'Search
Internet' and if the user selects this redirect to google or yahoo or
whatever given keywords that they enterd in the text box.

thanks
redhanz
Google has many APIs, which are rather easy to use. Check this page for
the Google Search APIs:

http://code.google.com/

Since Google uses GET in their search pages, it's quite easy to find out
which is the query string syntax. For example, a search for Laurent
Bugnion has this form:

http://www.google.ch/search?hl=en&q=...e+Search&meta=

The parameter "hl" is obviously for the language, and "q" is the
question. A simple try confirms it:

http://www.google.ch/search?hl=de&q=Lords+of+the+rings

This self-made URL returns a page in german with "Lords of the rings" as
search string. So it's quite easy to send a search request to Google
without using any API if needed.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 10 '07 #2

P: n/a
Have a simple form (no runat=server) such that the action is set to
something like:
http://www.google.com/search
or similarly for yahoo!

HTH

Or another way out may be that on click of the 'Search Internet' button, you
dynamically update the action of the form from 'search.aspx' to
'http://www.google.com/search' and provide appropriate query string.

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
<je**********@gmail.comwrote in message
news:11**********************@o58g2000hsb.googlegr oups.com...
>I am creating a webpage for my office. The start page is a search
engine that searches a company database.
it consists of a text box and a button called search.

I was wondering if i could add another button that would say 'Search
Internet' and if the user selects this redirect to google or yahoo or
whatever given keywords that they enterd in the text box.

thanks
redhanz

Jan 10 '07 #3

P: n/a
Thanks alot,

It really seemed more difficult that what it was. :)

jerm

Gaurav Vaish (www.Edujini-Labs.com) wrote:
Have a simple form (no runat=server) such that the action is set to
something like:
http://www.google.com/search
or similarly for yahoo!

HTH

Or another way out may be that on click of the 'Search Internet' button, you
dynamically update the action of the form from 'search.aspx' to
'http://www.google.com/search' and provide appropriate query string.

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
<je**********@gmail.comwrote in message
news:11**********************@o58g2000hsb.googlegr oups.com...
I am creating a webpage for my office. The start page is a search
engine that searches a company database.
it consists of a text box and a button called search.

I was wondering if i could add another button that would say 'Search
Internet' and if the user selects this redirect to google or yahoo or
whatever given keywords that they enterd in the text box.

thanks
redhanz
Jan 10 '07 #4

P: n/a
It really seemed more difficult that what it was. :)

coding is more fun and difficutly!
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
Jan 11 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.