i've tried several different variations of finding the length of a select element and nothing's working! i can't figure out why, since several websites list this is as the correct code.
here's the javascript:
<script type="text/javascript">
alert(document.getElementById("opentimes").options.length);
</script>
and here's the form:
<form action="eateries.php" method="POST" name="filters">
<select name="opentimes" id="opentimes" onChange="document.forms.filters.submit();">
<option value="now">Open Now</option>
<option value="tonight">Open Tonight</option>
<option value="late">Open Late</option>
<option value="whenever">Open Whenever</option>
</select>
.......
</form>
i know the alert is working because i've tested it with simple strings. i've tried variations like document.filters.opentimes.length and document.forms.filters.opentimes.length but nothing works!
thanks.