below is my code i eventually want to populate theyear with the values of the year which i will get from asp code. But i am getting errors with the code: options is null or not an object. what am i missing?
thanks
Code:
<FORM NAME="search" METHOD=GET ACTION="/KeyAndQuery.asp">
<select name = "querystr" onchange ="populate2()">
<option value = "New">New Developments
<option value = "Main">Maintenances/Enhancements
<option value = "Year"> By Year
</select>
<select name ="theyear">
</select>
</FORM>
<SCRIPT LANGUAGE = 'JAVASCRIPT'>
function populate2()
{
var box = document.forms["search"].elements["querystr"];
var index = box.selectedIndex
var selection = box.options[index].value;
if (!selectoin || selection!= "Year") return;
/*
more code to come ...
*/
}
</script>