levelninesports
asked on
I would like to add a display characters option to password entries
Some windows password input boxes have a checkbox that allows you to see the characters you are entering into a password input.
It seems a pretty easy answer with javascript checkbox deciding whether to input in password style or text style.. but I am pretty weak at javascript
It seems a pretty easy answer with javascript checkbox deciding whether to input in password style or text style.. but I am pretty weak at javascript
ASKER
That's pretty good.. now what do I have to do to have the input type switch back to password when they unclick?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Simply change the type= from "password" to "text" when the checkbox is checked.
<html>
<script language="javascript">
function show() {
document.formname.pass.typ
}
</script>
<body>
<form name="formname" method="POST" action="">
Username: <input type="text" value="" name="user" /><br />
Password: <input type="password" value="" name="pass" /><br />
<input type="checkbox" name="change" onClick="show()" />Show Password<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>