How to test if users has made any changes to a form if they haven't saved it
<p>Basically the same functionality as stackoverflow when posting a question, if you start writing a post then try to reload the page. You get a javascript alert box warning message. </p>

<p>I understand how to check if the form has been changed, although how do I do the next step. </p>

<p>I.E: How to I check this when leaving the page, on here you get "This page is asking you to confirm that you want to leave - data you have entered may not be saved."? </p>

<p>EDIT: found correct answer here to another question <a href="http://stackoverflow.com/a/2366024/560287">http://stackoverflow.com/a/2366024/560287</a></p>
