Hello im trying to get this checkbox code working, im using it in php in a while loop output so when the user gets there search output they can select an option by ticking a option but the user must at least select one option no more then 2 options cheers
<SCRIPT TYPE="text/javascript" LANGUAGE=JAVASCRIPT>
function checkCheckBoxes() {
if (document.Dates.checkbox.checked == false &&
document.Dates.checkbox.checked == false &&
document.Dates.checkbox.checked == false)
{
alert ('You didn\'t choose any of the checkboxes!');
return false;
}
else
{
return true;
}
}
//-->
</SCRIPT>
<form name="Dates" action="hello.php" method="post" onsubmit="return checkCheckBoxes();">