Technically, can you just put the alert message inside the submitHandler option? For example:
$("#form").validate({ submitHandler: function(form) { $(form).ajaxSubmit({ success: function() { alert("Thank you for your comment!")}, clearForm: true }); } }); On Jul 23, 12:42 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com> wrote: > You've got an error in the second selector, a missing #. Try this: > > $("#submit").validate({ > submitHandler: function(form) { > $(form).ajaxSubmit(); > } > > }); > > Jörn > > On Thu, Jul 23, 2009 at 3:22 PM, Nick<poomi...@googlemail.com> wrote: > > > Hi, > > > I am currently trying to validate a form before sending it with the > > jQuery Form Plugin. > > > I can get them working but it is always one or the other, I can't get > > them both working. > > > The code I have so far is below: > > > <script type="text/javascript"> > > $('#submit').ajaxForm(function() { > > alert("Thank you for your comment!"); > > }); > > $("submit").validate({ > > submitHandler: function(form) { > > $(form).ajaxSubmit(); > > } > > }) > > </script> > > > If possible, could somebody help?