1 Reply Latest reply on Feb 5, 2009 2:57 PM by jkronegg

    Avoidiing double form submission

    trouby

      I have a button that submits a form, the method is invoked synchronously and it takes few seconds to process,
      If the user submit the form again he gets an exception since the process is already submitted,



      Is there a way to know if the form is already have been submitted? if that is possible, disabling the button for example can be a nice idea to avoid double form
      submission,



      Thanks,



      Asaf.

        • 1. Re: Avoidiing double form submission
          jkronegg

          The simplier is to write some javascript code, something like:


          <form>
            <input type="submit" id="bt" onclick="this.disabled=true; this.form.submit();">
          </form>
          



          That's peudo-code. Look at google for references