I'm working on a form that has multiple stages inside tags.
The problem is when the user gets to the 3rd stage and they click continue , it resets them back to the 1st stage.
I believe this to be an issue with the java script although I'm not sure. If I change the if() part to something like if(phone = 11) (if the number entered has 11 digits) then it works , but it wont work with the validation.
Here is the java script to process the 3rd stage:
function processPhase3() {
var validmail = ( /[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/.test(email) ); //JUST A TEST
//phone.length = 11 && validmail
phone = _("Ctelephone").value;
mobile = _("Cmobile").value;
email = _("Cemail").value;
if (validmail) {
_("phase3").style.display = "none";
_("phase4").style.display = "block";
_("progressBar").value = 99;
_("status").innerHTML = "Step 4";
} else {
}
}