Hi Fang... Thanks again... When I ran it again I realised I had to change a few things, but not even sure if it's possible... Ok for the checkboxes I changed it to this...
Code:
if(!(form.checkbox2.checked && form.checkbox3.checked) && !form.checkbox1.checked)
{
theMessage = theMessage + "\n --> Please choose the appropriate checkbox!";
}
So now it says that checkbox 2 & 3 need to be selected together or checkbox 1 can be selected by itself... Further down the form I have a gender select radio button, but I realised this only needs to be selected if checkbox 2 & 3 are selected, is there anyway to combine this?
Code:
myGender = -1;
for (i=form.radio2.length-1; i > -1; i--) {
if (form.radio2[i].checked) {
myGender = i; i = -1;
}
}
if (myGender == -1) {
theMessage = theMessage + "\n --> You selected checkbox 2 & 3, so you must select your gender";
}