florida
12-28-2006, 07:19 PM
I have a password protected page but want to mask the output when entered. Now it prompts for password but shows the input.
Please advise how I can do this:
var password = prompt("Enter your password","");
if (password == "hotsource") {
alert("Password accepted! Loading page...");
document.write("<p>data here.</p>");
}
else {
alert("" +password+ " is an Invalid Password! Access denied...");
document.write("<p><b>You have entered an invalid password. ");
document.write("Access to the document is denied.</b></p>");
}
Please advise how I can do this:
var password = prompt("Enter your password","");
if (password == "hotsource") {
alert("Password accepted! Loading page...");
document.write("<p>data here.</p>");
}
else {
alert("" +password+ " is an Invalid Password! Access denied...");
document.write("<p><b>You have entered an invalid password. ");
document.write("Access to the document is denied.</b></p>");
}