I have an issue with a form I am creating, I have many check boxs where at least one of the 2 needs to be selected and the final one has to be selected for the submit button to become active
Code:
<form id="form1" action="#" method="post">
One <input type="checkbox" name="value1" onMouseDown='submit_form()'/>
Two<input type="checkbox" name="value2" onMouseDown='submit_form()'/>
//atleast 1 of these 2 has to be selected
Three<input type="checkbox" name="value3" onMouseDown='submit_form()'/>
//this 1 has to be selected
<input type="submit" name="submit" value="submit" id="submit" disabled="disabled"/>
this is the javascript I have atm to do this
Code:
function submit_form(){
if (form1.value1.checked == false || form1.value2.checked == false) {
document.getElementById(submit);
orderForm.submit.disabled=false;
}
}
i cant seem to get this to work, forgetting about the 3rd checkbox for now
any help would be greatly appreciated!