Code:
<html>
<head>
<script type="text/javascript">
function blah()
{
if (document.getElementById('opt_one').selected)
{ alert("Hello");
}
if (document.getElementById('opt_two').selected)
{ alert("Goodbye");
}
}
</script>
</head>
<body>
<form name="form" id="form" onsubmit="blah(); return false">
<select name="select">
<option name="one" id="opt_one" value="one">One</option>
<option name="two" id="opt_two" value="two">Two</option>
<option name="three" id="opt_three" value="three">Three</option>
</select>
<input type="submit" name="click" value="Go!"></input>
</form>
</body>
</html>
Bookmarks