I have two check boxes with different name and id and I want the users to check at least one of them if not the button will disable! but if one of them checked it will proceed to the other file
function validate(){
var time12 = document.getElementById("time12").checked;
var time24 = document.getElementById("time24").checked;
if((time12 == "") && ( time24 == "") )
{
alert("Choose your hour rate");
return false;
}
return true;
}
<input id="time12" type="checkbox" name="time12" value="12" />12hours
<input id="time24" type="checkbox" name="time24" value="24" />24hours
but before you type your hate comments I want you to inform that I already search about it and I don't have the same question like this!
or suggest me other way thank you in advance