SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member subhasishweb's Avatar
    Join Date
    Mar 2006
    Location
    West Bengal, India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Password Checking

    Hi All,

    I am creating a website where I have to check the password that will be either in Upper Case or Lower Case or Numeric. Can you please tell me anyone that how I will do it by javascript.


    Thanks & Regards,
    ---
    Subhasish Nag
    http://www.subhasish.net/

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,494
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    regex

    Hi subhasishweb, welcome to the forums,
    Client-side input validation using javascript will help your site's honest users. For what you described you could use regex. Something very worthwhile for you to learn as it is used in many other languages (in various "flavors") like PHP and Apache mods. Here's a couple of tutorials that should help.
    http://www.javascriptkit.com/javatutors/redev.shtml
    http://www.webreference.com/js/column5/index.html

  3. #3
    SitePoint Member subhasish.nag's Avatar
    Join Date
    Aug 2006
    Location
    Mumbai, India
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But, i need the exact code in javascript.

    Regards,
    Subhasish Nag
    Contact No: +91-9831581556(M)

  4. #4
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this way you will not learn, and that is the aim of this forum.

    What are your exact requirements?


  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,494
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    regex

    Just as determining the logic for writing conditional tests depends on what you want to do (and not do), writing regex can be a bit tricky at times to make sure that it both does what you want it to and not do what you don't want it to. Only you know exactly what you're working with and how you want to process it. Often it is fairly easy to get someone to give you something that "works", but later you will find that it also "works" in ways you don't want it to. The best way for you to get the "exact code" you need is to write it yourself. Believe me, learning regex will pay off in dividends. Not only is it used in javascript, but as I mentioned it's used in PHP, Apache and just about every other language that I know of. The tutorials I linked to are easy enough to follow and give examples. If you work at them for a day or two, I'm sure you'll get the hang of it.
    Also, if you have the Firefox browser, there is a regex testing extension, "Regular Expression Tester" that lets you experiment with the regex and input string "live" and see the resulting match.


Bookmarks

Posting Permissions

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