I want to check the value for a dropdown menu for "other" to make it
so they can add a location that is not on the list.
If the value = "other" I will bring up a dilog box they can enter
their location...I have replaced this with an alert for testing...it
does not work. What am I missing?
<head>
<script language="JavaS cript">
function location(s)
{
var v = s.options[s.selectedIndex];
if (v.value=="othe r")
alert("works");
}
</script>
</head>
<body>
<form><select name="location" size="1" onChange="locat ion(this)">
<option value=" "></option>
<option value="Access"> Access</option>
<option value="BI">BI</option>
<option value="CAB">CAB </option>
<option value="Durst">D urst</option>
<option value="OCB">OCB </option>
<option value="SRP">SRP </option>
<option value="Trecc">T recc</option>
<option value="other">o ther</option>
</select></form>
</body>
so they can add a location that is not on the list.
If the value = "other" I will bring up a dilog box they can enter
their location...I have replaced this with an alert for testing...it
does not work. What am I missing?
<head>
<script language="JavaS cript">
function location(s)
{
var v = s.options[s.selectedIndex];
if (v.value=="othe r")
alert("works");
}
</script>
</head>
<body>
<form><select name="location" size="1" onChange="locat ion(this)">
<option value=" "></option>
<option value="Access"> Access</option>
<option value="BI">BI</option>
<option value="CAB">CAB </option>
<option value="Durst">D urst</option>
<option value="OCB">OCB </option>
<option value="SRP">SRP </option>
<option value="Trecc">T recc</option>
<option value="other">o ther</option>
</select></form>
</body>
Comment