Menu
Hey all looking for a solution and cant find it.
How do I hash a prmopt() password?
[CODE]
<HEAD>
<SCRIPT language=”JavaScript”>
<!–hide
var password;
var pass1=”p@ssw0rd”;
password=prompt(‘Please enter your password to view this page!’,’ ‘);
if (password==pass1)
alert(‘Password Correct! Click OK to enter!’);
else
{
window.location=”error.php”;
}
//–>
</SCRIPT>
</HEAD>
When typing the password I get p@ssw0rd but I want it to display ******** instead. I know how to do this in a form but not in a password prompt.
Any suggestions?