title: Adding a "Mail Sending..." notification during AJAX request
body: <p>In my mail sending script powering my contact form, the mail sending action can take some time, during this time the user doesn't know what happens. So, I wanted to add a "Mail Sending..." notification. The "Mail Sending..." notification appears when the submit button is clicked, but the script processing stalls at this point infinitely, and further mail processing is not done. I shall appreciate clues on how to resolve this. Find below the AJAX script and html form code.</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function(){
          $('#submit').click(function(){
              $.post("send.php", $("#contactform").serialize(),function(response) {  
                $('#success').html('&lt;h4&gt;Mail Sending...&lt;/h4&gt;').load(url);
              });
              return false;
          });
      });
  &lt;/script&gt;   
  </code></pre>
  
  <p>And this is the contact form html code:</p>
  
  <pre><code>&lt;form action="" method="post" id="contactform" &gt;
      &lt;label for="name"&gt;Name:&lt;/label&gt;&lt;br /&gt;
      &lt;input type="text" name="name" id="name" /&gt;&lt;br /&gt;
      &lt;label for="email"&gt;Email:&lt;/label&gt;&lt;br /&gt;
      &lt;input type="text" name="email" id="email" /&gt;&lt;br /&gt;
      &lt;label for="message"&gt;Message:&lt;/label&gt;&lt;br /&gt;
      &lt;textarea name="message" id="message"&gt;&lt;/textarea&gt;&lt;br /&gt;
      &lt;input type="button" value="send" id="submit" /&gt;
      &lt;div id="success" style="color:red;"&gt;&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>