javascript - Jquery Validation without form submission -
i have form, on have button - when user clicks button add, function called adds new row table in same form, using javascript.
i have used jquery validation plugin,the problem have validation fires when use submit button,but not when button clicked, runs function.
i understand why - validation plugin wants form submitted.
is there way can cause validation run , return result? function can either nothing if validation fails, or go ahead , post user entered data function if validation passes. need without form submitting.
any appreciated - i've tried few ideas found whilst googling on this, nothing has worked far.
thank beforehand.
if mean http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
if ($j('#form1').validationengine({ returnisvalid: true })) { //is valid }
or if mean: http://docs.jquery.com/plugins/validation
$("#myform").validate({ submithandler: function(form) { // other code return false; } });
Comments
Post a Comment