It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

password html problem

password html problem

Postby tcy999 on Wed Mar 07, 2007 3:19 pm

Can someone help please? I am using the following code to put a password on a webpage, it all looks ok but will not display the location page (gallery2.html), and I can not work out why. A 'done but with errors on page' message indicates that the problem is with the line location="gallery2.html", but I don't see why? The file is in the same folder as this file so no need for file names, etc...... HELP! :oops:

<html>
<body TEXT="000066" bgcolor="#999999">
<br>

<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.pass.value=="password") {
location="gallery2.html"
} else {
alert("Invalid Password")
}
//-->
}</script>

<center>
<table bgcolor="#999999" cellpadding="12" border="0">
<tr><td colspan="2"><center><FONT face="Bradley Hand ITC" FONT SIZE="4">This is a private gallery.
Please enter your password.</font></center></td></tr>

<tr><td><h1><FONT face="Bradley Hand ITC" FONT SIZE="4">Password:</font></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br>
</form></td></tr></table></center>


</body>
</html> :oops:
tcy999
 
Posts: 2
Joined: Mon Feb 26, 2007 10:19 pm

Who is online

Users browsing this forum: No registered users and 7 guests