Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: help

  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Location
    dominican republic
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help

    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

  • #2
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>

  • #3
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Hi wicked:
    Please do not open two threads for the same question. Your initial inquiry was posted here: help Any followups should simply be added to it.

    Thanks,
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •