Hi,
I'm using a basic login script to control access to a page.
This is my script (in the head tag):
<script language="javascript">
<!--//
function dbLogin (form)
{
if (loginform.login.value=="dashboard") {
if (loginform.password.value=="PsWd123") {
window.location="dashboard.html";
}
else {
alert("Incorrect Password!");
}
}
else {
alert("Incorrect Login!");
}
}
//-->
</script>
This is my form tag:
<form name="loginform" onSubmit="dbLogin(this.form)">
This is my submit button:
<input type="submit" value="Submit">
I've tried it another way as well...
form tag: <form name="loginform">
submit btn: <input type="submit" value="Submit" onClick="dashboardLogin(this.form);">
Neither way redirects me to dashboard.html when the login and password are correct.
What am I missing??? Please help! Thanks!!
I'm using a basic login script to control access to a page.
This is my script (in the head tag):
<script language="javascript">
<!--//
function dbLogin (form)
{
if (loginform.login.value=="dashboard") {
if (loginform.password.value=="PsWd123") {
window.location="dashboard.html";
}
else {
alert("Incorrect Password!");
}
}
else {
alert("Incorrect Login!");
}
}
//-->
</script>
This is my form tag:
<form name="loginform" onSubmit="dbLogin(this.form)">
This is my submit button:
<input type="submit" value="Submit">
I've tried it another way as well...
form tag: <form name="loginform">
submit btn: <input type="submit" value="Submit" onClick="dashboardLogin(this.form);">
Neither way redirects me to dashboard.html when the login and password are correct.
What am I missing??? Please help! Thanks!!