title: Jquery Display Message then Ajax then hide message
body: <p>il give an example</p>
  
  <pre><code>document.ready(function() {
      $("#Show").bind("click", function() 
      {
          var F = Function2();
          if (F)
          {
              // Do Other Stuff.
          }
      }
  });
  
  function Function2()
  {
      $("#Message").Show();
  
      $.ajax({
                type: "POST",
                 url: [MyURL]
                 async: false;
                 contentType: 'application/json; charset=utf-8',
                 data: JSON.stringify(PostData),
                 dataType: "json",
                 success: function (returnVal) {
             $("#Message").Hide();
                     return true;
                 },
                 error: function (xhr, ajaxOptions, thrownError) {
                     return false;
                 }
             });
  
  }
  
  &lt;/script&gt;
  
  
  
  
  &lt;div id="Message" style="display:none;"&gt;
      &lt;!-- Loading Image In here --&gt;
  &lt;/div&gt;
  &lt;a href="#" id="Show" onclick="return:false;"&gt;Show then Hide&lt;/false&gt;
  &lt;/code&gt;
  </code></pre>
  
  <p>Now what I want to happen is for this messagebox to show however the AJAX for some reason wont show it until the AJAX Request is finished by which point it is too late.  I have set async to false which hasent helped either.</p>