title: Ajax success event not working
body: <p>I have a registration form and am using <code>$.ajax</code> to submit it.</p>
  
  <p><strong>This is my AJAX request:</strong></p>
  
  <pre><code>$(document).ready(function() {
      $("form#regist").submit(function() {
          var str = $("#regist").serialize();
          $.ajax({
              type: 'POST',
              url: 'submit1.php',
              data: $("#regist").serialize(),
              dataType: 'json',
              success: function() {
                  $("#loading").append("&lt;h2&gt;you are here&lt;/h2&gt;");
              }        
          });
          return false;        
      });
  });
  </code></pre>
  
  <p>In my <em>submit1.php</em> file I check for the existence of fields <em>email address</em> and <em>username</em> in the database.
  I wish to display an error message if those value exist <strong>without a page refresh</strong>.</p>
  
  <p>How can I add this to the <em>success</em> callback of my AJAX request?</p>