You need to use ajaxSubmit and the submitHandler option. Here is an example: http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html
Jörn On Tue, Sep 1, 2009 at 12:25 PM, HairyJim<james.d...@gmail.com> wrote: > > Hi all, > > Still green with JQ. I have the following code which does work to a > point except the validation runs but the form submits (via ajax) > regardless. I know I need to change the code round, ajax in the the > validate call - I think. Could do with help on this! > > $(document).ready(function() > { > $("#myform").validate(); > $("#myform").ajaxForm({ > success: function() { > $('#contact_form').html("<div id='message'></div>"); > $('#message').html("<h2>Contact Form Submitted!</h2>") > .append("<p>We will be in touch soon.</p>") > .hide() > .fadeIn(1500, function() { > $('#message').append("<img id='checkmark' > src='/images/ > check.png' />"); > }); > } > }); > }); >