Quick JS question
Posted: 2004-01-15 11:27am
Code: Select all
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function jumpPage(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value
if (newPage != "") {
window.location = newPage
}
}
//-->
</script>
</head>
<body onLoad="document.myForm.newLocation.selectedIndex=0">
<div align="center"><form action="" name="myForm"><select name="newLocation" onChange="jumpPage(this.form.newLocation)">
<option value="" selected>Select a State</option>
<option value="cmal.htm">Alabama</option>
<option value="cmak.htm">Alaska</option>
// .....
<option value="cmwy.htm">Wyoming</option>
</select>
</form></div>
</body>
</html>
~ver