Have check boxes 1-300. This JS function alerts user when nothing is selected. Function works great for the first 290 elements. For example, when item 291 is selected it alerts that nothing is selected. document.checks.user.length is coming out to 298, not sure why that is either. Any suggestions? Thanks.
function sub_delete() //Submit & Validation for delete
{
alert ( document.checks.user.length); 298?
for (i = 0; i < document.checks.user.length; i++) //for all check boxes
{
if (document.checks.elements[i].name == "user" && document.checks.elements[i].checked == true ) //otherwise elements also looks at radio buttons
{
document.checks.submit();
return 0;
}
}
//If we get here no delete was (true) selected
alert ( "Select Data to Delete" );
return 0;
}