472,983 Members | 2,318 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

redirecting to google

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
4 3530
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Birch | last post by:
I have a python script that uses the print function throughout, and as well uses calls to os.system() to spawn DOS commandline executables. My issue is that I redirect all of the output from this...
3
by: David Douard | last post by:
Hi everybody, let me explain by problem: I am working on an application which consists in a C++ dll (numeric computations) and a Python IHM (Python/Tk), which must run under Linux and win32. My...
11
by: Peter | last post by:
I have a modest website that uses a lot of Javascript. If anybody views the site and does not have Javascript enabled I want to politely redirect them to another page, so I put this bit of code...
9
by: Michael | last post by:
I've written my progrma to use cout a lot, but now i want to output this to a file instead of the screen. How do i do this Is it platform specific (if so then sorry) Thanks Mike
2
by: Agoston Bejo | last post by:
Hi, how can one redirect std::cerr into a file? Specifically, if I have an ofstream object, is there something I can do to make "cerr << ..." calls write into that particular ofstream object? ...
1
by: Gurikar | last post by:
How to redirect information to file usinf cerr or clog. Regards
1
by: Ankur Jain | last post by:
Hi, I am facing a very weird problem while redirecting to another page. The problem is as follows: I have a website. I build the solution and run the application. The first page is the login...
8
by: Morpheus | last post by:
I am trying to test a function that outputs text to the standard output, presumably using a cout call. I do not have access to the source, but need to test the output. Is this possible? I can...
1
by: sreekeerthi | last post by:
hi friends...this is keerthi...i am doing a project where i want to redirect my page when ever the back button is clicked...for this i am using window.onbeforeunload method..and for page redirection...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.