Highlight Errors

Discussion in 'JavaScript' started by Hosea, Apr 26, 2012.

  1. #1
    Hi

    I am doing validation on a form, but instead of throwing an alert on empty fields I want to highlight those fields maybe with a yellow color indicating error. if all are empty, then i would like to show only 1 generalized error message "Pls. fill the highlighted textboxes.". how do i do this and thanks in advance.
     
    Hosea, Apr 26, 2012 IP
  2. singh1720

    singh1720 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    For your reference
    javascript-coder.com/html-form/form-validation.phtml
    tetlaw.id.au/view/javascript/really-easy-field-validation
    webcheatsheet.com/javascript/form_validation.php


    Sample project
    rickharrison.github.com/validate.js/


    Refence Code
    github.com/vivin/regula/wiki
    github.com/icanberk/JS-Form-Validator
     
    singh1720, Apr 27, 2012 IP
  3. e-abi

    e-abi Member

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    3
    Trophy Points:
    38
    #3
    e-abi, Apr 29, 2012 IP
  4. joerudy1988

    joerudy1988 Peon

    Messages:
    196
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    JQuery is so powerful these days. There are lots of plugins available for you to use.

     
    joerudy1988, May 22, 2012 IP
  5. sufalamtech

    sufalamtech Peon

    Messages:
    116
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can enable this function from jquery or from inside css form validation.
     
    sufalamtech, May 31, 2012 IP