Killinger
07-08-2004, 10:43 PM
Hey guys, I need help with a password. The if and else commands are switched for some reason. Heres the code
<script language="javascript">
function One()
{
var password=prompt("Please Enter Password")
if (password !="pass")
(location="http://www.htmlgoodies.com")
else (location="http://www.htmlsucks.com")
}
</script>
<BODY BGcolor="#ffffff" onLoad="One()">
when you enter pass it goes to htmlsucks.com, but when you enter something else, it goes to htmlgoodies.com when it should be the other way around. Thanks in advance!
<script language="javascript">
function One()
{
var password=prompt("Please Enter Password")
if (password !="pass")
(location="http://www.htmlgoodies.com")
else (location="http://www.htmlsucks.com")
}
</script>
<BODY BGcolor="#ffffff" onLoad="One()">
when you enter pass it goes to htmlsucks.com, but when you enter something else, it goes to htmlgoodies.com when it should be the other way around. Thanks in advance!