I might have it coded a bit wrong for the part I'm asking about but I'll give the solutions that work and the one that doesn't.
First example works:
function SignUpClick(){
if (document.UserSignUp.UserEmail.value == document.UserSignUp.ConfirmEmail.value);
else {alert ("Your email does not match - Please re-enter"); return;}
if (document.UserSignUp.UserPassword.value == document.UserSignUp.ConfirmPassword.value);
else {alert ("Your password does not match - Please re-enter"); return;}}
This second example also works:
function SignUpClick(){
if (document.UserSignUp.UserEmail.value != document.UserSignUp.ConfirmEmail.value)
{alert ("Your email does not match - Please re-enter"); return false;}
else return true;}
But this last one doesn't work:
function SignUpClick(){
if (document.UserSignUp.UserEmail.value != document.UserSignUp.ConfirmEmail.value)
{alert ("Your email does not match - Please re-enter"); return false;}
else return true;
if (document.UserSignUp.UserPassword.value != document.UserSignUp.ConfirmPassword.value)
{alert ("Your password does not match - Please re-enter"); return false;}
else return true;}
The interesting part about the last example is that the first confirm works but when I add and test out the second confirm, then it doesn't work and I'm not entirely sure why. As a side note, I tested out the second confirm on its own without the first and it worked fine. Has something to do with when a second one or more is added.
Any thoughts or suggestions of what I might be missing?