Results 1 to 5 of 5
Aug 13, 2003, 19:49 #1
Turning a regular input filed into a password type field
here's what I would like to accomplish.
I have an input field for the users name and I have one for their password.
Now when they come onto the page I want to have the value for the username filed say "username" and the passwordfield should say "password". Then when the users focusses on the password input the input type should turn password so when they type their password it shows like "*******".
I someone understands what I'm trying to say
Thanks in advance,
Aug 13, 2003, 20:33 #2HTML Code:
<input type="text" name="myfield" id="myfield" value="password" onfocus="this.setAttribute('type', 'password');this.value='';" />
I also don't recommend this as your best option, since if a user has JS disabled the password will be displayed clear as day to anybody passing by his/her monitor. This may not leave a good impression of your site's security from the user's standpoint.
Aug 13, 2003, 20:42 #3
Aug 13, 2003, 21:01 #4Originally Posted by Percept
Aug 13, 2003, 21:04 #5