55 users online (1 members and 54 guests)  


  Results 1 to 3 of 3

Related

  1. Trimming a word.How?    Forum: PHP Forum
    Replies: 1
  2. word wrap on notepad    Forum: HTML Forum
    Replies: 3
  3. MS Word in websites    Forum: HTML Forum
    Replies: 5
  4. 1 word 2 links How do you do it?    Forum: HTML Forum
    Replies: 3
  1. #1
    tiagosilva29's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    4

    Question How to validate pieces of a word or a word itself in a array?

    [TEXT BOX] <-

    [VALIDATING BUTTON] <-

    How can I validate pieces of a word or a word itself in a array?!??

    In Example:

    I type "T" , validate [!OK!]
    "TE" validate [!OK!]
    "TEA" validate [!OK!]
    "TEAS" validate [!WRONG!]

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Prob easiest to use the .match() method, it uses regular expressions.

    Good intro here: http://www.regular-expressions.info/javascript.html

    Witha great example here: http://www.regular-expressions.info/javascriptexample.html
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    tiagosilva29's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    4

    Thumbs up Thanks!

    Thank you, QuietDean.

    You're a great guy.



Tags for this Thread