I am having a form in which there are some checkboxes. I want to bring up an alert message in case someone shall choose less than 2 checkboxes. Can you please help me on that because all my attemps are fallen to the ground. This is my checkbox field (that comes up from a loop)
<input type='checkbox' name='check' value="<%=set("customerid")%>" />
<input type='checkbox' name='check' value="<%=set("customerid")%>" />
<input type='checkbox' name='check' value="<%=set("customerid")%>" />
...etc
and my validating code:
if (form.check.count > 3)
{
alert("Please select more than 2 options");
return false;
}
Aucun commentaire:
Enregistrer un commentaire