Posted By

TC on 09/12/06


Tagged

form jquery


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

penguin999
francisre
neuroasis
vali29
orhanveli
mikegreen
seanpowell


Use jQuery to validate form text


 / Published in: JavaScript
 

URL: http://beta.plazes.com/register/

Found on the jquery mailing list: http://jquery.com/discuss/2006-April/004625/ The url shows it in action, checking text when you move away from a field.

  1. $("#my-form input[@type='text']").blur(function() {
  2. var query = {};
  3. query[this.name] = this.value;
  4. $.post("/path/to/your/validation.php", query, function(response) {
  5. // do something like changing a css class, disable submit...
  6. )};
  7. });

Report this snippet  

You need to login to post a comment.