//JavaScript
function checkCountry(slctFild)
{
if(slctFild.selectedIndex==1)
{
showStateSelectBox();
hideProvinceSelectBox();
}
else
{
if(slctFild.selectedIndex==36)
{
hideStateSelectBox();
showProvinceSelectBox();
}
else
{
document.getElementById("00N200000013FlZ").selectedIndex = 0; // ERROR gets thrown here!!!
document.getElementById("00N200000013Flo").selectedIndex = 0;
hideStateSelectBox();
hideProvinceSelectBox();
}
}
}
//HTML Registraton Form
<select id="00N200000013FlU" title="Country" onchange="checkCountry(this)" name="00N200000013FlU">
<option value="" selected="selected">--None--</option>
<option value="United States of America">United States of America</option>
...
</select>
<select id="00N200000013FlZ" title="State" name="00N200000013FlZ">
<option value="" selected="selected">--None--</option>
<option value="Alabama">Alabama</option>
...
</select>
<select id="00N200000013Flo" title="Province" name="00N200000013Flo">
<option value="" selected="selected">--None--</option>
<option value="Alberta">Alberta</option>
...
</select>
I get an error message every so often with this code.
'document.getElementById(...)' is null or not an object.
Ive added a comment to the line that i receive the error from. I cant seem to Find the error.
Any Help?
Thanx