Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: Check Entry...

  1. #1
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    hey people...

    I'm just wonduring how to use the CheckEntry() code in javascript..
    I'm just refreshing my memory bt scanning through my javascript book and doin the test pages.. and well im wanting to make a lil form in this test im on..

    Create a form which has a password field and a button which checks the password is correct. Once it's correct opens a new window..

    all i have got is this and im like stuck lol... i've never done any passwords before so can ya help..

    <HTML>
    <HEAD>
    <TITLE>passwords</TITLE>
    </HEAD>
    <BODY>


    <P ALIGN="CENTER">
    <INPUT TYPE = text password = password>
    <INPUT TYPE = button VALUE = "done" onClick = "checkEntry()">


    </BODY>
    </HTML>
    not very much i agree lol but im only learning wen it comes to this type of coding we all start somehwere
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    735
    Member #
    1935
    im not sure what you mean..

    if you just want to check that the passwords value equals 'password' then do this.

    function check(){
    if (document.form.password.value=="password")
    {
    alert("yay");
    } else {
    alert("wrong passowrd");
    return false;
    }
    return true;
    }


    and by the way, your code is hellishly messed up. I suppose you just copied it wrong or something...


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:17 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com