title: Synchronous form submit to Asynchronous submit - Issue
body: <p>I have a button on UI which adds messages and when the user clicks on it the form gets submitted, meanwhile the user is clicking on refresh(F5) multiple times which is causing the same message to be displayed multiple times. To resolve this , I am converting the form from a synchronous submit to Asychronous but it is still not working. Please assist. Below is the code:</p>
  
  <p>Code before:</p>
  
  <pre><code>&lt;td&gt;&lt;input class="buttonred" type="submit" value="Confirm Add" name="submit_message"&gt;&lt;/td&gt;
  
  &lt;s:form action="upd-message" method="POST" validate="true" onsubmit="validateMsg();return false;" enctype="multipart/form-data"&gt;
  </code></pre>
  
  <p>Code After:</p>
  
  <pre><code>&lt;tr&gt;
                                  &lt;td width="15%"&gt;&lt;strong&gt;Subject:&lt;/strong&gt;&lt;/td&gt;                                                               
                                  &lt;td width="30%" class="contentformnoline"&gt;
                                      &lt;input name="subject" size="12" maxlength="100"&gt;                              
                                  &lt;/td&gt;
                                  &lt;td width="20%"&gt;&amp;nbsp;&lt;/td&gt;                                                               
                              &lt;/tr&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;&lt;strong&gt;Message:&lt;/strong&gt;&lt;/td&gt;                                                               
                                  &lt;td class="contentformnoline"&gt;
                                      &lt;textarea cols="65" rows="3" name="content" wrap="hard"&gt;&lt;/textarea&gt;                                 
                                  &lt;/td&gt;
                                  &lt;td&gt;&amp;nbsp;&lt;/td&gt;                                                               
                              &lt;/tr&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;div id="loading_reloadpage" style="display:none;"&gt;
                              &lt;tagfile:loading id="loading_reloadpage_img" size="11px"/&gt;&amp;nbsp;Reloading information...
                          &lt;/div&gt;
  
  &lt;tr id="test-sc-step2-errors-row" style="display:none"&gt;
                          &lt;td&gt;&lt;/td&gt;
                          &lt;td colspan="2" class="contentform" height="30"&gt;&lt;span id="newSR-sc-step2-errors" class="alert"&gt;&lt;/span&gt;&lt;/td&gt;
                      &lt;/tr&gt; 
  </code></pre>
  
  <p>In my jquery.js</p>
  
  <pre><code> jQuery.submitMessage= function() {
      incidentsInspect.submitMessage = function() {
      var bError = true;
      var subject = $('#subject');
      alert("subject"+$('#subject'));
  
      var content = $('#content');
      alert("content"+$('#content'));
      if (this.isEmpty(subject)) {
          $('#test-sc-step2-errors-row').html('Please enter a subject.');
      }
      else if (this.isEmpty(content)) {
          $('#test-sc-step2-errors-row').html('Please enter a content.');
      } 
      else {
          bError = false;
      }
  
      if (bError) {
          $('#test-sc-step2-errors-row').show();
      } else {
          //$('#loading_reloadpage').show();
          //$('#loading_reloadpage_img').show();
          show("loading_reloadpage");
          show("loading_reloadpage_img");
  
          var dataToPost = {
                  actionType : $('#actionType').val()
              };
  
          var url = '/portal/tickets/update-incident.action';
          $.post(url, dataToPost,
                  function(data) {
  
          }
          ).error(incidentsInspect.handleError);
      }
  };
  </code></pre>
  
  <p>Things which are not working:</p>
  
  <ol>
  <li>When I do browser refresh, it still does multiple submits and adds the messages multiple times.</li>
  <li>Validations not working, I added alerts to print the values but it displays the value as object.</li>
  <li>show("loading_reloadpage");
  show("loading_reloadpage_img"); not working</li>
  </ol>
  
  <p>Please assist.</p>