Hello all,


I have a very large form, and one of the sections in the form is a group of
about 14 checkboxes. I would like to limit the number of checkboxes that a user
may click on to 3, BUT ONLY IN THIS GROUP. Right now I have code which limits
the number of checkboxes you can click on, but for an entire page, not just a
section.

Here it is:


<script language="JavaScript" type="text/javascript">

function chNum(mostneededtech)
{aVar=mostneededtech.form
cCount=0
for (i=0;i<aVar.elements.length;i++)
if (aVar.elements[i].type==='checkbox' && aVar.elements[i].checked)
cCount+=1
if (cCount > 3){
alert('Please only select 3 boxes.')
mostneededtech.checked=false
}
}

</script>

Can someone please help!? Thank you in advance.