SarahBara
11-09-2003, 06:56 PM
I'm trying to use the javascript thing to give the visitors to my site access to a special page that they need a password to get into. I just have no idea how to use it...
neopetz.html: the page they are leaving
neopetsadoption.html: the page that is linked from the above one, and this is also the one that needs to be password protected...
What do I put in the code to get it to work?
<script language="JavaScript" type="text/javascript">
<!--hide
var password;
var pass1="mypassword";
password=prompt('What's the word again?',' ');
if (password==pass1)
alert('Clickie to see the shmeshy critters');
else
{
window.location="notsurewhatiputhere";
}
//-->
</script>
Any help would be greatly appreciated...
neopetz.html: the page they are leaving
neopetsadoption.html: the page that is linked from the above one, and this is also the one that needs to be password protected...
What do I put in the code to get it to work?
<script language="JavaScript" type="text/javascript">
<!--hide
var password;
var pass1="mypassword";
password=prompt('What's the word again?',' ');
if (password==pass1)
alert('Clickie to see the shmeshy critters');
else
{
window.location="notsurewhatiputhere";
}
//-->
</script>
Any help would be greatly appreciated...