title: Form not submitting with AJAX
body: <p>=====UPDATE AGAIN==== (if anyone cares!)
  the solution I posted before stopped working for whatever reason. I included a beforeSend in my ajax request and pasted the portion of my js that validates my form into it. Works like a charm now!</p>
  
  <pre><code>$('#form').on('submit', function(e) {
  e.preventDefault(); //prevents page refresh
           $.ajax({
          type: "post",
          beforeSend: function(){ // check that form is complete
                          },
          url: "client_config_send2.php",
          data: $(this).serialize(),
          success:  function(data){
              alert('Thank you'); hide_request();window.location = "#top";
          }
         });
     });
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>See my answer below, using 2 .preventDefault!</p>
  
  <p>I have read through many pages / examples of this, but for some reason I can't get it to work on "my" form.
  I'm simply trying to submit my form without refreshing the page or opening a new page / tab for the confirmation message.
  The form:</p>
  
  <pre><code>&lt;form id="form" name="Configurator" method="post" action=""&gt;
  .... //Client configures his product, display an image if they choose, and request a quote.
  &lt;button id="submit_button" type="submit" name="Submit" &gt;Request&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The client_config_send2.php works, it simply pulls a bunch of parameters from the form (configuration, contact info) and puts it into an email. This part works fine before I try to integrate the ajax.</p>
  
  <p>The JS:
      </p>
  
  <pre><code>$('form').on('submit', function(e) {
  e.preventDefault();     
  if(!validateForm(this)){
  return true;
  }
  
  $.ajax({
          type: "post",
          url: "client_config_send2.php",
          data: $(this).serialize(),
          done:  function(data){
              alert("Thank you, we will get back to you shortly");
  }
          });
  
  })  
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The validateForm() function also works, it checks if the configuration is valid, if the email / contact info is complete, etc.
  At this point, the validateForm works: if info is missing, the alert pops up. However when validateForm() returns true, the form doesn't submit, nothing happens.</p>
  
  <p>I have tried success instead of done, return false instead of true in the JS, and many other things I found online but I am lost. Never used AJAX before so I'm not 100% confident with the subtleties of the language!</p>
  
  <p>Thanks in advance!</p>