Greelmo
05-14-2003, 01:59 PM
I think that this is just my computer being retarded, but i can't get this thing to work at all... I want a simple little form with an input and a password and a button. The user types there name and password, clicks the button, and gets on. I have only one user i want on this site because it is somewhat of a family gift. So, why isn't the following function working?:
<html>
<head>
<title>Please Login</title>
<SCRIPT LANGUAGE="JavaScript">
function fncdexter(texty, passy)
{
usern="Earl".toLowerCase();
userp="Hello".toLowerCase();
if (texty.toLowerCase()==usern && passy.toLowerCase()==userp){
alert("Login successful.");
location.href="http://www.geocities.com/dexweiss/motherday.html";}
else{
alert("Username/Password combination is incorrect.";}
}
</script>
</head>
<body bgcolor=#00ff00>
<form name="form1">
<input type="text" name="username">
<br>
<input type="password" name="userpass">
<input type="button" value="Login"
onClick="fncdexter(this.form.username.value, this.form.userpass.value); return false;">
</form>
</body>
</html>
any help is appreciated
<html>
<head>
<title>Please Login</title>
<SCRIPT LANGUAGE="JavaScript">
function fncdexter(texty, passy)
{
usern="Earl".toLowerCase();
userp="Hello".toLowerCase();
if (texty.toLowerCase()==usern && passy.toLowerCase()==userp){
alert("Login successful.");
location.href="http://www.geocities.com/dexweiss/motherday.html";}
else{
alert("Username/Password combination is incorrect.";}
}
</script>
</head>
<body bgcolor=#00ff00>
<form name="form1">
<input type="text" name="username">
<br>
<input type="password" name="userpass">
<input type="button" value="Login"
onClick="fncdexter(this.form.username.value, this.form.userpass.value); return false;">
</form>
</body>
</html>
any help is appreciated