title: Submit a form and stay on the same page?
body: <p>I'm trying to make my form stay on the same page using jquery. I'm using a form named #clientUpdate-form that posts it's input to update.php. I have tried removing the window.location.href and tried changing it to window.location.href="edit_form.php?edit_id="+edit_id but the form always reverts back to index.php</p>
  
  <p>Full Code:</p>
  
  <pre><code> /* Update Record  */
   $(document).on('submit', '#clientUpdate-form', function() {
      $.post("update.php", $(this).serialize()).done(function(data) {
          $("#dis").fadeOut();
          $("#dis").fadeIn('slow', function() {
              $("#dis").html('&lt;div class="alert alert-info"&gt;' + data + '&lt;/div&gt;');
              $("#clientUpdate-form")[0].reset();
              $("body").fadeOut('slow', function() {
                  $("body").fadeOut('slow');
                  window.location.href = "index.php";
              });
          });
      });
      return false;
   });
   /* Update Record  */
  </code></pre>