I downloaded the password applet from Javascript.The request for password comes up and it accepts the password but then nothing happens.Am I doing it wrong? The following goes into the head
<!– THREE STEPS TO INSTALL THREE TRIES:
1. Put the first code into the HEAD of your HTML document2. Change protectedpage.html to your protected page3. Add the final code to the BODY of your HTML document –>
<!– STEP ONE: Copy this code into the BODY of your HTML document –>
<HEAD>
<SCRIPT LANGUAGE=”JavaScript”>
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com
<!– Begin
function password() {
var testV = 1;
var pass1 = prompt(‘Please Enter Your Password’,”);
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1 == “password”) {
alert(‘You Got it Right!’);
<!– STEP TWO: Change protectedpage.html to your protected page –>
// Change the following URL to your protected filename
window.open(‘protectedpage.html’);
break;
}
testV+=1;
var pass1 =
prompt(‘Access Denied – Password Incorrect, Please Try Again.’,’Password’);
}
if (pass1!=”password” & testV ==3)
history.go(-1);
return ” “;
}
// End –>
</SCRIPT>
</head>