[PHP-DB] RE : validate 2 password fields

2004-06-30 Thread Neil Smith [MVP, Digital media]
Sorry, my typo, the else line should have read (note the missing brace) return true; } else { alert("Passwords did not match"); Please note you need to turn on error reporting for scripts in IE or your chosen browser - doing so would have told you the line which had

[PHP-DB] RE : validate 2 password fields

2004-06-29 Thread Neil Smith [MVP, Digital media]
Attach onsubmit="return checkpasswords()" to your form tag. function checkpasswords() { df=document.forms["DisplayUser"]; if (df["password1"].value==df["password2"].value) { // Passwords matched, clear password2, allow form to submit df["password2"].value=""