I created this function, but somehow it doesn't work. I'm not that good at JS so I can't point what's wrong wiith it...
function checkform(form){
with (form){
next=true;
if (nick.value == null || nick.value == ""){
alert("Nickname must be filled");
nick.focus();
next = false;
} else if (pass1.value == null || pass1.value == ""){
alert("Password Must be over 4 characters long");
pass1.focus();
next = false;
} else if (pass1.value <> pass2.value){
alert("Both passwords do not match");
pass2.focus();
next = false;
}
if (next == false){
return false;
} else {
return true;
}
}
}
However, if I delete the code to only check one field, it works...