Reputation: 1619
I have the following
var validate=prompt("Enter your PIN","Enter your PIN");
This works fine except it shows the password when typing it.
Is there any way to mask the password being entered?
Cheers,
Upvotes: 1
Views: 10974
Reputation: 1823
It's impossible to hide the password.JS load on the client side. We can easily find the password by checking the source code.
Here is an example. Check it out yourself http://www.pageresource.com/jscript/jpass.htm
Upvotes: 0
Reputation: 975
If you really want a prompt window and accept a password, you might want to use this plugin along with jquery. Check out example 9 on http://trentrichardson.com/Impromptu/index.php and use type="password"
instead.
Upvotes: 0
Reputation: 382726
Nope, there is no way to mask prompt
box. You will have to use some other custom solution or use password
input box instead.
If you want to do validation of password, do it on the server-side not client-side.
Upvotes: 3