jquery validate requires two clicks to submit <p>I have a form that has two buttons. One to edit a specific candidate after the information has been submitted, another button to just submit and add another candidate. Since there are two buttons on the screen, I need to know which one was clicked so that I can escort the user down the right path. </p> <p>I am using the jQuery Validation Plugin to help me validate the form before posting it. To prevent users from double clicking the button and submitting a duplicate candidate, I am disabling the button and changing the button to "Submitting" as demonstrated here:</p> <pre><code>/* This will change the button only if the form has passed and change the button to submitting and disable it */ submitHandler: function(form) { $('#saveandadd').click(function() { $('#saveandadd').val('Submitting...'); $('saveandadd', this).attr('disabled', 'disabled'); form.submit(); }); $('#saveandedit').click(function() { $("input[name='setvalue']").val('1'); $('#saveandedit').val('Submitting...'); $('saveandedit', this).attr('disabled', 'disabled'); form.submit(); </code></pre> <p>So far this is nice as I can change the button that was clicked to submitting. However, I have noticed a strange problem. Either button requires two clicks to submit it. </p> <p>I have setup a fiddle here: <a href="http://jsfiddle.net/mwoods98/vge2bh8w/1/" rel="nofollow">Form Validation</a> that requires the first and last name to be filled in. You will be prompted as an error if those fields are not filled in.</p> <p>Thanks in advance</p>