for (var i = 1; i < 100; i++) {
if(document.FORM.chkTableType[i].checked==false &&
document.FORM.chkTableType[i]+"_"+"1".checked==false &&
document.FORM.chkTableType[i]+"_"+"2".checked==false )
{
window.alert("Please select at least 1 table to download");
return false;
}
}
I want to validate combo box in javascript, the purpose if having this document.FORM.chkTableType[i]+"_"+"1" is to generate something like the following:
document.FORM.chkTableType1_1
document.FORM.chkTableType1_2
document.FORM.chkTableType2_1
document.FORM.chkTableType2_1
but it throws error: Unable to get property '1' of undefined or null reference
im not sure where whether the syntax of this is correct---> document.FORM.chkTableType[i]+"_"+"1"
document.FORM.chkTableType[i]+"_"+"1".checked