rendered paste body<script>var langjs = new Array();
langjs["crazillaformserrormsgs1"] = "Error";
langjs["crazillaformserrormsgs2"] = "`^^^` field is too shory";
langjs["crazillaformserrormsgs3"] = "Invalid characters in `^^^` field";
langjs["crazillaformserrormsgs4"] = "`^^^` field too long";
langjs["crazillaformserrormsgs5"] = "Mismatched password fields";
langjs["crazillaformserrormsgs6"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs7"] = "No spaces in field";
langjs["crazillaformserrormsgs8"] = "Require `^^^` field must be filled";
langjs["crazillaformserrormsgs9"] = "User name already exist. Please select another";
langjs["crazillaformserrormsgs10"] = "Please select at least || from `^^^` field";
langjs["crazillaformserrormsgs11"] = "Invalid date";
langjs["crazillaformserrormsgs12"] = "The email is invalid";
langjs["crazillaformserrormsgs13"] = "Invalid security code";
langjs["crazillaformserrormsgs14"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs15"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs16"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs17"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs18"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs19"] = "Undefined error of mine!";
langjs["crazillaformserrormsgs20"] = "Undefined error of mine!";
</script>
<script>
function CheckBoxCount(minibox,maxibox,totalcheckbox,formname,cboxname,divname)
{
var realcount=3;
///var cboxname="checkbox";
var nname;
var i;
var totalcount
totalcount=0;
for(i=1;i<=totalcheckbox;i++)
{
nname = cboxname + '['+i+']';
if (document.forms[formname].elements[nname].checked==true) {
totalcount=totalcount+1;
}
}
if (minibox>totalcount) {
if (minibox == 1 && totalcheckbox == 1) {
errormsglangjs = langjs["crazillaformserrormsgs4"];
document.getElementById(divname).innerHTML = errormsglangjs;
} else {
errormsglangjs = langjs["crazillaformserrormsgs2"];
errormsglangjs=errormsglangjs.replace("^^^",minibox);
document.getElementById(divname).innerHTML = errormsglangjs;
}
}
else if (maxibox<totalcount) {
errormsglangjs = langjs["crazillaformserrormsgs3"];
errormsglangjs=errormsglangjs.replace("^^^",maxibox);
document.getElementById(divname).innerHTML = errormsglangjs;
return false;
} else {
document.getElementById(divname).innerHTML = '';
return true;
}
}
</script>
<form name="MyForm1" id="MyForm1" method="get" action="#" onsubmit="return CheckBoxCount(1,3,5,"myform1="MyForm1"",'"ilike","MyForm1ilikeError")">
<input name="ilike[]" id="checkilike" value="332" type="checkbox" />
<input name="ilike[]" id="checkilike" value="3fd2" type="checkbox" />
<input name="ilike[]" id="checkilike" value="3vcbvc2" type="checkbox" />
<input name="ilike[]" id="checkilike" value="3fdg2" type="checkbox" />
<input name="ilike[]" id="checkilike" value="3ret2" type="checkbox" />
</form>