florida
05-21-2004, 01:37 PM
I am trying to get the form to focus on the checkbox field if it is left blank.
I keep getting errors on the focus method saying "Object doesnt support this property or method".
for(x=0;x<document.myform.myfieldname.length;x++)
{
if(document.myform[x].checked)
var checked;
}
if(!checked)
{
alert('Checkbox is not checked');
document.myform.myfieldname.focus();
return false;
}
I keep getting errors on the focus method saying "Object doesnt support this property or method".
for(x=0;x<document.myform.myfieldname.length;x++)
{
if(document.myform[x].checked)
var checked;
}
if(!checked)
{
alert('Checkbox is not checked');
document.myform.myfieldname.focus();
return false;
}