jQuery Validation with Ajax

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
bla5e
Forum Contributor
Posts: 234
Joined: Tue May 25, 2004 4:28 pm

jQuery Validation with Ajax

Post 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!!
bla5e
Forum Contributor
Posts: 234
Joined: Tue May 25, 2004 4:28 pm

Re: jQuery Validation with Ajax

Post by bla5e »

removed the quotes around true and it works
Post Reply