johnjohn
COMMENTS:
1..Functions must have trailing semi-colons:
funcRedirect() = wrong
funcRedirect(); = correct
2..There is a very big difference between:
<UPDATE> and UPDATE
3..Same as above for:
<test2.asp> and test2.asp
IMO:
1..<option> tags should have a closing </option> tag
2..Almost all
JS functions code should be in the head of your document
3..This post is better suited in the
JS forum
This will work for you:
-----------------------cut n paste---------------------
<HTML>
<head>
<title></title>
<script Language="JavaScript">
function funcRedirect()
{
if(document.frmOptionSelector.cboChoices.options[document.frmOptionSelector.cboChoices.selectedInde x].text=="UPDATE")
{
window.location="test2.asp";
}
}
</script>
</head>
<BODY>
<FORM METHOD="GET" ACTION="Test1.asp" NAME="frmOptionSelector">
<SELECT NAME="cboChoices" onchange="funcRedirect();">
<OPTION>the one</option>
<OPTION>dude</option>
<OPTION>UPDATE</option>
</SELECT>
</FORM>
</BODY>
</HTML>
--------------------finish cut n paste----------------------
Wind is your friend
Matt