Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1329 How do you have a user enter a password, then re-enter the password to be verified?

irt.org | Knowledge Base | JavaScript | Password | Q1329 [ previous next ]

Q1329 How do you have a user enter a password, then re-enter the password to be verified?

Try:

<form>
Enter Password: <input name="P1" type="password" value="">
Verify Password: <input name="P2" type="password" value="">
<input type="button"
onClick="if (this.form.P1.value != '' && this.form.P2.value != '' && this.form.P1.value ==
this.form.P2.value )
   alert('Passwords match');
   this.form.submit();
}
else {
   alert('Passwords do not match');
   this.form.P1.focus();
}">
</form>

Feedback on 'Q1329 How do you have a user enter a password, then re-enter the password to be verified?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.