473,568 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3566
Hi,

je**********@gm ail.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**********@g mail.comwrote in message
news:11******** **************@ o58g2000hsb.goo glegroups.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**********@g mail.comwrote in message
news:11******** **************@ o58g2000hsb.goo glegroups.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
12693
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 script to a file (including that which is printed by the spawned programs) via the redirect (">") function on a Win2K Command Prompt. In the...
3
3746
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 problem is the C++ lib does write stuffs on its stdout, and I would like to print those messages in a Tk frame. When I run the computation, it has...
11
2006
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 in my <head> section : <script type="text/javascript" language="JavaScript">document.write("<!"+"--")</script> <meta http-equiv="Refresh"...
9
1366
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
6004
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? Thx, Agoston
1
3104
by: Gurikar | last post by:
How to redirect information to file usinf cerr or clog. Regards
1
1269
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 page. I enter a valid login and password and click the "login" button. The click event call the database and validates the information. After...
8
5769
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 technically create an executable that calls the function and then using a command prompt call the exexutable using the > output.txt redirector but I...
1
1447
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 i am using window.location and my code is as follows <html> <head> <script type="text/javascript"> var confirm = true; window.onbeforeunload =...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.