www.webdeveloper.com
Results 1 to 6 of 6

Thread: Form validation

Hybrid View

  1. #1
    Join Date
    Mar 2012
    Posts
    20

    Smile Form validation

    Hi
    I am making registration form for my website,how can i write javascript validation code to display errors with out an alert box.
    I want to display an error message next to the input field.

    thank you so much in advance

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,259
    Post a brief example of the form you are trying to validate.
    Not the whole thing, just a brief HTML (with or without script) test program.

  3. #3
    Join Date
    Mar 2012
    Posts
    20
    HI
    I have a form with name,password,email,country,age fields.

  4. #4
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,259

    Exclamation

    Quote Originally Posted by aneesh29 View Post
    HI
    I have a form with name,password,email,country,age fields.
    Don't make us do the easy part. Show some work.

  5. #5
    Join Date
    May 2004
    Location
    chennai, tamil nadu, India
    Posts
    437
    http://docs.jquery.com/Plugins/Validation#demo

    I understand using a framework just for form validation is overkill but if you are planning to do more things using javascript then I definitely recommend using a framework like jQuery
    Chris, Senior Developer, Chrisranjana.com
    Php Programmers

  6. #6
    Join Date
    Dec 2002
    Location
    St. Louis, MO, USA
    Posts
    1,582
    In a nutshell, place a div with a unique ID just next to the inputs and change the innterHTML of each to display the error message as it pertains to that field if that field isn't valid.
    |||||
    o . Q
    ___ "You live and you learn; or you don't live long." - Lazarus Long

    ^_^

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles