Password Confirmation Form
Solved
Nowhere Man
Posted messages
319
Status
Membre
-
Nowhere Man Posted messages 319 Status Membre -
Nowhere Man Posted messages 319 Status Membre -
Good evening,
I am trying to create a member area for my site, and for that in the registration form I am asking for a password, I would like to introduce another password field as a confirmation of the previous one. Should I create a condition in JavaScript with "onSubmit" in the <form> tag like this?
With:
If this method works, nothing happens when submitting the form, how can I create an alert if the passwords are different?
Thank you in advance.
--
___ ToOiinou.
I am trying to create a member area for my site, and for that in the registration form I am asking for a password, I would like to introduce another password field as a confirmation of the previous one. Should I create a condition in JavaScript with "onSubmit" in the <form> tag like this?
<form method="post" action="index.php?id=confirm_inscription" onSubmit='if (this.password.value != this.password_confirm.value) {return false ;}'> With:
<p>Password :<br /> <input name="password" type="password" size="50" /><br /> Password (confirmation) :<br /> <input name="password_confirm" type="password" size="50" /> </p><hr />
If this method works, nothing happens when submitting the form, how can I create an alert if the passwords are different?
Thank you in advance.
--
___ ToOiinou.
Configuration: Windows Seven Firefox 3.0.6</form>