title: How to send data to server synchronously using JQuery?
body: <p>I have to send some data to server in JQuery and I'm lost in a lot of functions like <em>.ajax</em>, <em>.post</em>, etc.</p>
  
  <p>The conditions are very easy: a form must be sent synchronously, it won't return any value, but if there is an error we have to stop sending more data (really, I am sending a bunch of forms).</p>
  
  <p>So, the question is: which is the best function to do it and which are the minimum parameters I have to use?</p>
  
  <p>At the moment, my approach is this:</p>
  
  <pre><code>            $.ajax({
                  url: form.attr('action'),
                  type: 'POST',
                  data: form.serialize(),
                  async: false,
              });
  </code></pre>
  
  <p>but as you can see, I'm not getting a return value if error.</p>