I want to include an AJAX call within a .submit()
handler so that I can process form data and send email confirmations before the form is fully submitted. Therefore I'd like to make the submission wait until the AJAX call is complete, so that I can cancel the submission or do other things based on the response.
How would I go about doing this?