Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think that your problem is this line:</p> <pre><code>$('input').attr('disabled','disabled'); </code></pre> <p>You're disabling ALL the inputs, including, I'd guess, the ones whose data the form is supposed to submit. </p> <p>To disable just the submit button(s), you <strong>could</strong> do this:</p> <pre><code>$('button[type=submit], input[type=submit]').prop('disabled',true); </code></pre> <p>However, I don't think IE will submit the form if even those buttons are disabled. I'd suggest a different approach.</p> <h2>A jQuery plugin to solve it</h2> <p>We just solved this problem with the following code. The trick here is using jQuery's <code>data()</code> to mark the form as already submitted or not. That way, we don't have to mess with the submit buttons, which freaks IE out.</p> <pre><code>// jQuery plugin to prevent double submission of forms jQuery.fn.preventDoubleSubmission = function() { $(this).on('submit',function(e){ var $form = $(this); if ($form.data('submitted') === true) { // Previously submitted - don't submit again e.preventDefault(); } else { // Mark it so that the next submit can be ignored $form.data('submitted', true); } }); // Keep chainability return this; }; </code></pre> <p>Use it like this:</p> <pre><code>$('form').preventDoubleSubmission(); </code></pre> <p>If there are AJAX forms that <strong>should</strong> be allowed to submit multiple times per page load, you can give them a class indicating that, then exclude them from your selector like this:</p> <pre><code>$('form:not(.js-allow-double-submission)').preventDoubleSubmission(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload