Click to See Complete Forum and Search --> : ...is null or not an object


megetron
May 12th, 2004, 07:04 AM
Hi for all javascript programmers,
I get an erroe and i need help:

<script language="javascript">
function OnComboChange(obj)
{
var thisItem=document.all.areaid.selectedIndex;
document.all.area_id.value =document.all.areaid.options[thisItem].value;
}
</script>

and in the html i insert a code like this:

<%
Dim area_id
area_id=-1
%>

<select name="areaid" id="areaid" value=option dir=rtl type=text onchange="OnComboChange(this);">
<option value="1"> area1
<option value="2"> area2
</select>


the error displayed is: 'document.all.area_id' is null or not an object

10x for you all.

megetron
May 12th, 2004, 08:34 AM
i SHOULD insert a tag for this value:

<input name="area_id" type="hidden" >
and a form.