Hello all,
This must be a deadly simple question but I'm such a javascript newbie that I don't know how this is done.
Basically I want my javascript function to use the value that was chosen in a drop down box. Here's the code:
<script type="text/javascript">
function chgCity() {
alert (*** I want to show which city was chosen here ***);
}
</script>
<select id="city" name="city" onChange="chgCity()">
<option value"New York">New York</option>
<option value"Chicago">Chicago</option>
<option value"Denver">Denver</option>
</select>
Thanks,
-Striker
This must be a deadly simple question but I'm such a javascript newbie that I don't know how this is done.
Basically I want my javascript function to use the value that was chosen in a drop down box. Here's the code:
<script type="text/javascript">
function chgCity() {
alert (*** I want to show which city was chosen here ***);
}
</script>
<select id="city" name="city" onChange="chgCity()">
<option value"New York">New York</option>
<option value"Chicago">Chicago</option>
<option value"Denver">Denver</option>
</select>
Thanks,
-Striker