Cadwalader
IS-IT--Management
Hello...
I need to password protect one page. It's not a super high security issue, so javascript can do it.
This is what I have so far,
<SCRIPT LANGUAGE="javascript">
var getin = prompt("What is the password?",""
if (getin=="peppermint"
{
alert('You got it right!')
location.href='laws.html'
}
else
{
if (getin=="null"
{location.href='nope.html'}
else
if (getin!="peppermint"
{location.href='nope.html'}
}
</SCRIPT>
But I don't want that alert in there, and when I take it out, it gets stuck in a loop. You have to enter the password twice, and then you get the error page. Can anyone help? I am so lost...:-( Hope I was of some help...
--OR--
Thanks for the help...
--Rich
I need to password protect one page. It's not a super high security issue, so javascript can do it.
This is what I have so far,
<SCRIPT LANGUAGE="javascript">
var getin = prompt("What is the password?",""

if (getin=="peppermint"

{
alert('You got it right!')
location.href='laws.html'
}
else
{
if (getin=="null"

{location.href='nope.html'}
else
if (getin!="peppermint"

{location.href='nope.html'}
}
</SCRIPT>
But I don't want that alert in there, and when I take it out, it gets stuck in a loop. You have to enter the password twice, and then you get the error page. Can anyone help? I am so lost...:-( Hope I was of some help...
--OR--
Thanks for the help...
--Rich