I've made the code simpler and less annoying, here it is:
For passwords only:
function password() {
var pass1 = prompt('Please Enter Your Password','');
if (pass1 == "code1","code2","code3","code4") {
window.location="http://www.protectedpage.com/protectedpage.htm";
}
}
For a login and a password:
function password() {
var login = prompt('Please Enter Your Login ID','');
var pass1 = prompt('Please Enter Your Password','');
if (pass1 == "pass1","pass2","pass3","pass4") {
if (login == "login1","login2","login3","login4") {
window.location="http://www.afpsupport.r8.org/access/id2.htm";
}
}
}
Unfortunately, without me spending a lot of time on the script, I can't link the logins and passwords, so with the second one, you could use the login "login1", but the password "pass4".
Shouldn't be a problem if no-one shares their passwords!
If your server does support it, ddAdmin's post has a very valid point.
Anyway...
Simply save that text into script.js (replacing the old script file), and change code1, code2, code3 etc to your desired passwords, and the protectedpage to wherever you want it to go.
I haven't got the faintest idea why you can't rename a file. :p
Enjoy!
cr3ative
(how many beers is that now?)