...

View Full Version : help



wicked
07-28-2002, 11:59 PM
i'm still having some problems with the code, cuz pass isnt working
<script language="JavaScript" type="text/javascript">

function checkpass()
{

var b;

var a="pass";

b=prompt('Your password here',' ');

if (a==b)
{

window.location="pr.php?pass="+a;
}
else
{
window.location="pr.php?pass=no";
}
}

</script>

pls help me out

Mrs G
07-29-2002, 07:44 PM
Tried your script like this and it appears to work ok.


<script language="JavaScript" type="text/javascript">

function checkpass(){
var b;
var a="pass";

b=prompt('Your password here',' ');

if (a==b){
window.location="Correct"
}
else {
window.location="Wrong";
}
}
onload=checkpass
</script>

WA
07-29-2002, 10:54 PM
Hi wicked:
Please do not open two threads for the same question. Your initial inquiry was posted here: http://www.codingforums.com/showthread.php?s=&threadid=2882 Any followups should simply be added to it.

Thanks,



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum