I get a "document.getElementById("CountyList") has no properties" error message in the JavaScript Console in Fire Fox.
line error in function:
entire function:
thanks to all
line error in function:
Code:
document.getElementById('CountyList').options.length = 0;
entire function:
Code:
function State_Select()
{
ind = document.forms['payoff_regionsearch'].elements['StateList'].selectedIndex;
val = document.forms['payoff_regionsearch'].elements['StateList'].options[ind].value;
if (ind == 0)
{
alert('Select a valid State.')
//clearlist();
//var i;
//for (i = document.payoff_regionsearch.CountyList.options.length - 1; i >= 1; i--){
// document.payoff_regionsearch.CountyList.options[i] = null;
// }
//document.payoff_regionseach.CountyList.selectedIndex = 0;
document.forms['payoff_regionsearch'].submit();
document.forms['payoff_liensearch'].elements['PropOwnName'].text = "";
document.forms['payoff_liensearch'].elements['PropFolioNum'].text = "";
document.forms['payoff_liensearch'].elements['PropAddress'].text = "";
document.forms['payoff_regionsearch'].elements['CountyList'].disabled=true;
document.forms['payoff_liensearch'].elements['PropOwnName'].disabled=true;
document.forms['payoff_liensearch'].elements['PropFolioNum'].disabled=true;
document.forms['payoff_liensearch'].elements['PropAddress'].disabled=true;
}
else
{
[b]
document.getElementById('CountyList').options.length = 0;[/b]
document.forms['payoff_regionsearch'].submit();
document.forms['payoff_regionsearch'].elements['CountyList'].disabled=false;
document.forms['payoff_liensearch'].elements['PropOwnName'].disabled=false;
document.forms['payoff_liensearch'].elements['PropFolioNum'].disabled=false;
document.forms['payoff_liensearch'].elements['PropAddress'].disabled=false;
}
return 0;}
thanks to all