Save form input with jQuery
<p>I have a form with multiple fields on a page. If a user fills in the fields and then decides to leave the page he/she will loose it. I'd like to add an alert using jQuery UI dialog to alert them about the data that has not been saved. I think I can get the buttons and dialog figured out. My question is: how do I detect them leaving the page without submitting the form?</p>
