Menu
HI guys I’m facing problem with check boxes again.. ?
I want to alert if there are no check boxes clicked and then focus back on check boxes..My code given below works fine if I have more then 1 check box but if I have one it gives error…can anyone help
flag = 0;
for(i=0;i<document.ven.camera.length;i++)
{
if(document.ven.camera[i].checked == true)
{
flag = 1;
}
}
if(flag == 0)
{
alert(‘Please choose Camera’);
document.ven.camera[0].focus();
return;
}