function isChecked(url)
{
f=document.frmName
var checkFound = false;
for (var counter=0; counter < f.length; counter++)
{
if ((f.elements[counter].name == ‘checkBoxId[]’) && (f.elements[counter].checked == true))
{
checkFound = true;
}
}
if (checkFound != true)
{
alert(‘Please check at least one checkbox.’);
return false;
}
else
{
//do something
}

}

check whether any of the checkbox are checked or not

Leave your comment