How can I return the value of a drop down in Netscape? Here is some basic code. In IE the value is show in an alert and is correct. In Netscape it is shown in an alert at null? What am I doing wrong here in regards with returning the dropdown value in Netscape?
<html>
<head>
<title></title>
<script language="JavaScript">
function getValue() {
var x;
x = document.form1.select.value;
alert (x);
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="form1" method="post" action="">
<select name="select" OnChange="getValue()">
<option value="1">Number1</option>
<option value="2">Number2</option>
</select>
</form>
</body>
</html>
Thanks,
Ed
<html>
<head>
<title></title>
<script language="JavaScript">
function getValue() {
var x;
x = document.form1.select.value;
alert (x);
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="form1" method="post" action="">
<select name="select" OnChange="getValue()">
<option value="1">Number1</option>
<option value="2">Number2</option>
</select>
</form>
</body>
</html>
Thanks,
Ed