Hi,
I'm trying to figure out the code to have the user enter a simple password, have it verified, and if true redirect to a url. The password is the same for all users. It's doesn't lead to a sensitive place so I don't need encryption or unique passwords, or even user names. So I've gotten this far, but where the password condition is verified, I can't figure out how to code tags to automatically jump to a new url. In other words, where "else return true", I want to call a url to open.
Thanks very much, Dave
............................
Here's some of the code I have so far (AND I INDICATED WHAT I BELIEVE THE PROBLEM SPOT IS BY WRITING A LITERAL IN CAPS AFTER --ELSE RETURN TRUE--):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="TextPad 4.4">
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Carey Walker ([email protected]) -->
<!-- Begin
function checkPw(form) {
pw1 = form.pw1.value;
if (pw1 != "1012cherry") {
alert ("\nPassord incorrect. Please re-enter.")
return false;
}
else return true;
<!-- WHERE PW1 == "1012CHERRY", I WANT TO GO TO HTTP:\\WWW....ETC -->
}
// End -->
</script>
</HEAD>
<BODY Background=../graphics/grayback.jpg>
<center><BR><BR><BR>
<form onSubmit="return checkPw(this)">
<table border=0>
<tr>
<td>Password:</td><td><input type=text name=pw1 size=10></td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit value="Submit!"></td>
</tr>
</table>
</form>
</center>
</BODY>
</HTML>
I'm trying to figure out the code to have the user enter a simple password, have it verified, and if true redirect to a url. The password is the same for all users. It's doesn't lead to a sensitive place so I don't need encryption or unique passwords, or even user names. So I've gotten this far, but where the password condition is verified, I can't figure out how to code tags to automatically jump to a new url. In other words, where "else return true", I want to call a url to open.
Thanks very much, Dave
............................
Here's some of the code I have so far (AND I INDICATED WHAT I BELIEVE THE PROBLEM SPOT IS BY WRITING A LITERAL IN CAPS AFTER --ELSE RETURN TRUE--):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="TextPad 4.4">
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Carey Walker ([email protected]) -->
<!-- Begin
function checkPw(form) {
pw1 = form.pw1.value;
if (pw1 != "1012cherry") {
alert ("\nPassord incorrect. Please re-enter.")
return false;
}
else return true;
<!-- WHERE PW1 == "1012CHERRY", I WANT TO GO TO HTTP:\\WWW....ETC -->
}
// End -->
</script>
</HEAD>
<BODY Background=../graphics/grayback.jpg>
<center><BR><BR><BR>
<form onSubmit="return checkPw(this)">
<table border=0>
<tr>
<td>Password:</td><td><input type=text name=pw1 size=10></td>
</tr>
<tr>
<td colspan=2 align=center><input type=submit value="Submit!"></td>
</tr>
</table>
</form>
</center>
</BODY>
</HTML>
Comment