Page 1 of 1

jQuery Validation with Ajax

Posted: Wed Apr 28, 2010 10:14 am
by bla5e
I have an ajax post request method i need to run AFTER the form has been validated. I was just using a button, but ofcourse that wont work with validation, it needs to be a submit button. How do I get around this? I have been trying todo an inline javascript if statement in my button

Code: Select all

 <input type="button" value=" submit " onClick="if( $('#form').valid() == 'true'){ mymethod(); }else{ alert('Finish the Form'); }">
but its not working..
PLEASE I NEED HELP!!

Re: jQuery Validation with Ajax

Posted: Wed Apr 28, 2010 10:40 am
by bla5e
removed the quotes around true and it works