You are here: irt.org | FAQ | JavaScript | Link | Q1025 [ previous next ]
Use the following:
<SCRIPT LANGUAGE="JavaScript"><!-- function getValue(url) { return (url.indexOf('?') > -1 ? url.substring(0,url.indexOf('?')) : url) + '?' + escape(document.myName.mySelect.options[document.myName.mySelect.selectedIndex].value); } //--></SCRIPT> <FORM NAME="myName"> <SELECT NAMe="mySelect"> <OPTION VALUE="123">first <OPTION VALUE="234">second <OPTION VALUE="345">third </SELECT> <FORM> <A HREF="http://www.irt.org/" onClick="this.href=getValue(this.href)">irt.org</A>