-----Original Message-----
Custom JavaScript validation. Count the checkboxes that are checked. If
there are more than 3, alert the user and return false.
var i = 0;
if (document.forms[0].CHK1.checked) i++;
if(document.forms[0].CHK2.checked) i++;
....
if (i > 3)
{
alert("Only 3 Checkboxes can be checked");
return (false);
}
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
I got a total of 8 checkboxes, but only want to allow a
total of three to be checked, can be any three
checkboxes. Any thoughts???
Thanks
Dave
.