how to get the selected value from a dropdown box to populate a google search box that is on my site. It would be even better if the search happened automatically upon user selection from the dropbox.

chefmgbrown
chefmgbrown used Ask the Experts™
on
how to get the selected value from a dropdown box to populate a google search box that is on my site. It would be even better if the search happened automatically upon user selection from the dropbox. Any ideas or help would be greatly appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
set window.location on the onChange event of select
function fnDoGoogleSearch (text)
{
	window.location = "http://www.google.com/search?q=" + text;
}
 
<select onChange="fnDoGoogleSearch(this.value)">

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial