SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    java script for password

    Hi!

    How to write java script for verifying that quantity of password symbols and symbols we can see in the password box is the same?

  2. #2
    Member
    Join Date
    Mar 2011
    Posts
    52
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: java script for password

    Hi Charley,

    You need to get a value (some symbols) from your password edit box and pass it to the CheckPasswordLength function.

    Try using the sample code below to accomplish your task:
    [code=JScript]
    var Password = "123qwe"; //Your correct password

    //The CheckPasswordLength function checks whether the entered password's length is equal to that of your correct password or not
    function CheckPasswordLength(EnteredPassword) {
    var PasswordLength;
    PasswordLength = Password.length;
    if (EnteredPassword.length == PasswordLength)
    Log.Message("Your password's length is correct.");
    else
    Log.Message("Your password's length is wrong!");
    }

    function Main() {
    var EnteredPassword;
    EnteredPassword = Sys.Process("ProcessName) ... //Here you need to get an entered password and then pass it to the CheckPasswordLength function
    CheckPasswordLength(EnteredPassword);
    }
    </pre><hr />

    If this is not what you need, please describe your task in detail.
    Tanya,
    SmartBear Technical Community Manager, Testing Tools

    Interested in more, visit our SmartBear community

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:14 PM.

Copyright BetaSoft Inc.