Hi, I have a register page where there is a field for confirming the password. I have a function that evaluates if the two boxes have the same text and I call this function in the form tag, but it doesn´t work. Can someone help? Thanks in advance.
Function:
function checkPasswords() {
if (document.classic.userPassword.value!=document.classic.userPasswordChek.value) {
alert('Passwords do not match');
document.newuser.userPassword.focus();
return false;
} else {
return true;
}
}
Calling the function:
onsubmit="return checkPasswords()"