Hi all, I have a form where I have two sets of fields that need to the same value. I am using this code and that works, but I'd like to know if there is an easier way.
See how I have to retype the if statement again for the secnond field? Is there an easier way?
____________________________________
Just Imagine.
Code:
function confirmIt () {
var confirmHRE = document.registrationForm;
var errorMSG = "";
if(confirmHRE.Password.value != confirmHRE.ConfirmPassword.value) {
alert("Password does not match. Please retry.");
return false;
}
if(confirmHRE.Email.value != confirmHRE.ConfirmEmail.value) {
alert("Email does not match. Please retry.");
return false;
}
}
See how I have to retype the if statement again for the secnond field? Is there an easier way?
____________________________________
Just Imagine.