D
Dave D.
I have a total of 8 checkboxes, but the user is only allowed to check
any three of them. After have been checked I have an alert box saying
that only 3 boxes can be checked. I'm trying to get so that it
disable's the checkboxes that are not checked, but then if one of the
three get unchecked, then all checkboxes become enabled again. Here's
my code so far....(In Javascript)
function chkCount()
{
var i = 0;
if (document.frmShortService.chkLH.checked) i++;
if (document.frmShortService.chkLTL.checked) i++;
....
if (i > 3)
{
alert("Only 3 Checkboxes can be checked");
return(false);
}
}
<input type="checkbox" name="chkLH" value="YES" onclick="chkCount()">
.....
Thanks in Advance!
Dave
any three of them. After have been checked I have an alert box saying
that only 3 boxes can be checked. I'm trying to get so that it
disable's the checkboxes that are not checked, but then if one of the
three get unchecked, then all checkboxes become enabled again. Here's
my code so far....(In Javascript)
function chkCount()
{
var i = 0;
if (document.frmShortService.chkLH.checked) i++;
if (document.frmShortService.chkLTL.checked) i++;
....
if (i > 3)
{
alert("Only 3 Checkboxes can be checked");
return(false);
}
}
<input type="checkbox" name="chkLH" value="YES" onclick="chkCount()">
.....
Thanks in Advance!
Dave