Try this: $("#form-external-link").validate({ rules: { exlink_url: { required: true, url: true } }, submitHandler: function(form) { alert('This will pop up only once as it should'); form.submit(); } });
It triggers the native submit event just once, without binding an additional submit event or, even worse, triggering the validation to run again. Jörn On Sun, Feb 8, 2009 at 6:21 PM, zubin <zubin...@yahoo.com> wrote: > > I'm having a problem with validating first then submitting a form with > jQuery after success. It works however it seems like my submit() > function keeps sending multiple submits and keeps growing each time i > reuse the form (i made sure the values are reset after each submit). > I'm not sure if its my code since i've re-checked it for hours to no > avail. Here is the code in a nut-shell: > > My form with id of #form-external-link is validated when submit button > is clicked: > > $("#form-external-link").validate({ > rules: { > exlink_url: { > required: true, > url: true > } > }, > submitHandler: function(form) { > alert('This will pop up only once as it should'); > $(form).submit(function() { > alert('This will pop up every twice, 3x, 4x, etc. > after each > validate success'); > }); > } > }); > > Am I missing something from my code?? >