i just want to create a password in my javascript webpage, and after the user inputted the right password he will be directed to other wegpage that i created.


heres my code

<html>
<head>
<title>"level 1"</title>
</head>
<body>
<script type="text/javascript">

alert ("hi challenger! please press ok and tell me youre name");
var a = prompt("so your name is? ", " to be honest! I FORGOT!")
alert ("ahh, ok! so youre name is " + a);


document.write("if you want to challenge yourself then you've come to the right place!<br>first! i would like you to find the password to gain access to level 2");
</script>

<script language="text/JavaScript">
{
var a="null";
function check()
{
if (document.a.c.value == a)
{
document.location.href="cary1.html/"+document.a.c.value+".htm";
}
else
{
alert ("Try again");
}
}
}
</script>

<tr>
<td width="100%" height="267" valign="top"><b><font size="7" face="Arial">Level 1</font></b><p>&nbsp;</p>
<div align="center">
<center>
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="15%" id="AutoNumber4">
<tr>
<td width="100%">
<p align="center"><font size="1" face="Tahoma"><br>
</font><font size="2" face="Tahoma">Password/font><form name="a" action="javascript:check()">

<p align="center">
<input type="login" name="c" maxlength="25" size="16"><br>
<br>
<input type="submit" value=" Log In "></p>
</form></p>
</td>
</tr>
</table>
</center>
</div>
</font></b></p>
</td>
</tr>



</body>
</html>


oops! i forgot to say, i want to write the password in the page source so that it can be view by the users, what i want to create are a maze-like webpage where you will need to find the password.


thanks!