html select box functionality

jameshuckabonetech
jameshuckabonetech used Ask the Experts™
on
I need a javascript function that adds the value of whatever option is selected onto a base url that i have predetermined. In other words...

The select box I want should be as follows:

Language:
<select>
 <option value="chinese">Chinese</option>
</select>

<input type="image" value="submit" onclick="URL + (language);


How could I achieve this?                                                                                                                                                                                                                                                                                                                                                                    
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Expert
Top Expert 2009
Commented:
better like this:

<form action="nojavascript.html" onSubmit="this.action='http://baseurl.com/?language='+this.language.options[this.language.selectedIndex].value">
<select name="language">
 <option value="chinese">Chinese</option>
</select>

<input type="image" src="submit.gif" />
</form>

Open in new window

Author

Commented:
Nice!

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