/    Sign up×
Community /Pin to ProfileBookmark

I downloaded the password applet from Javascript.The request for password comes up and it accepts the password but then nothing happens.Am I doing it wrong? The following goes into the head

<!– THREE STEPS TO INSTALL THREE TRIES:

  • 1. Put the first code into the HEAD of your HTML document

  • 2. Change protectedpage.html to your protected page

  • 3. Add the final code to the BODY of your HTML document –>
  • <!– STEP ONE: Copy this code into the BODY of your HTML document –>

    <HEAD>

    <SCRIPT LANGUAGE=”JavaScript”>

    <!– This script and many more are available free online at –>
    <!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

    <!– Begin
    function password() {
    var testV = 1;
    var pass1 = prompt(‘Please Enter Your Password’,”);
    while (testV < 3) {
    if (!pass1)
    history.go(-1);
    if (pass1 == “password”) {
    alert(‘You Got it Right!’);

    <!– STEP TWO: Change protectedpage.html to your protected page –>

    // Change the following URL to your protected filename

    window.open(‘protectedpage.html’);
    break;
    }
    testV+=1;
    var pass1 =
    prompt(‘Access Denied – Password Incorrect, Please Try Again.’,’Password’);
    }
    if (pass1!=”password” & testV ==3)

    history.go(-1);
    return ” “;
    }
    // End –>
    </SCRIPT>
    </head>

    to post a comment
    JavaScript

    2 Comments(s)

    Copy linkTweet thisAlerts:
    @A1ien51Dec 11.2006 — That is not an applet....

    Are you sure that the pop up blocker did not bock the window.open()

    I hope you know this is not secure! ?

    Eric
    Copy linkTweet thisAlerts:
    @gellauthorDec 13.2006 — Thanks Eric

    I know it's not secure but it does not matter there is nothing that needs hiding very much. It isn;t the pop up blocker. Seems something in IE7 and I can't find the blighter

    Cheers gell
    ×

    Success!

    Help @gell spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.2,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,
    )...