You are here: irt.org | FAQ | JavaScript | Form | 8 | Q748 [ previous next ]
Yes:
<SCRIPT LANGUAGE="JavaScript"><!-- function goto_URL(object) { window.location.href = object.options[object.selectedIndex].value; } //--></SCRIPT> <FORM> <SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)"> <OPTION VALUE="http://www.irt.org">irt.org <OPTION VALUE="http://www.irt.org/script/faq.htm">JavaScript FAQ </SELECT> </FORM>
On some older browsers the onChange event handler does not trigger until the focus moves from the form field.