Warning a user when navigating away from a Drupal form without saving
Normal users are not like us. We know that if we leave a page before submitting a form, the data we have added will be lost. Normal users might be happily filling in a web form, get half way through, get distracted and then click on a link and lose their data. Ok, maybe they are exactly like us, because I have done this as well. We are all busy. We all get distracted.
A helpful reminder is in order - a simple popup with a warning, alerting the user to the fact that if they leave the current page, they will lose the data on the form.
Check out Node Edit Protection