title: How do I do a jQuery blocking AJAX call without async = false?
body: <p>I have a page which does AJAX validation of an email before continuing on to the next page, using the HTML5 setCustomValidity() method [using the webshims library for older browsers].</p>
  
  <p>For this to work, I set the async option to false in the $.ajax() call to make it synchronous, blocking the page pending the AJAX response, as otherwise the form submits before the ajax call returns, rendering the validation ineffectual.</p>
  
  <pre><code>&lt;script&gt;
    function validateEmailRegistered(input) {
      if (input.setCustomValidity === undefined) return;
      var err = 'Email address not found';
      $.ajax({
        url: 'email-is-registered.php', 
        data: { email: input.value }, 
        async: false, 
        success: function(data) {
          var ok = data=='true';
          input.setCustomValidity(ok ? '' : err)
        }
      });
    }
  &lt;/script&gt;
  
  &lt;form method="get" action="nextpage.php"&gt;
    &lt;input name="email" id="email" type="email" required
      onChange="validateEmailRegistered(this)"&gt;
    &lt;button type="submit"&gt;go&lt;/button&gt;
  &lt;form&gt;
  </code></pre>
  
  <p>I see that the async option is to be deprecated as of jQuery 1.8.</p>
  
  <p>How can I achieve this blocking action without the async option?</p>