Here's a simple script I have pulled from various sources and wondered if
there was a way to improve it. First, if the type the wrong password, I
would like to redirect them to another login page to tell them to try again.
Second, I would like to figure otu a way to keep someone from just
bookmarking pages behind the main page to bypass the password. I know this
is nor perfect and there is nothing critical behind the password protected
pages, but just wanted to shore it up a bit.
Thanks!
function PasswordLogin()
{
document.locati on.href = document.formlo gin.password.va lue + ".htm";
return false;
}
function CheckEnter(even t)
{
var NS4 = (document.layer s) ? true : false;
var code = 0;
if (NS4)
code = event.which;
else
code = event.keyCode;
if (code==13)
{
PasswordLogin() ;
event.returnVal ue = false;
}
}
there was a way to improve it. First, if the type the wrong password, I
would like to redirect them to another login page to tell them to try again.
Second, I would like to figure otu a way to keep someone from just
bookmarking pages behind the main page to bypass the password. I know this
is nor perfect and there is nothing critical behind the password protected
pages, but just wanted to shore it up a bit.
Thanks!
function PasswordLogin()
{
document.locati on.href = document.formlo gin.password.va lue + ".htm";
return false;
}
function CheckEnter(even t)
{
var NS4 = (document.layer s) ? true : false;
var code = 0;
if (NS4)
code = event.which;
else
code = event.keyCode;
if (code==13)
{
PasswordLogin() ;
event.returnVal ue = false;
}
}
Comment