detecting unsaved work

Submitted by: 
This project will teach you how to trap your user with an unsaved work. It has only few lines of code in javascript. If the user has unsaved work and application that is not completed and attempt to close the window, the pop up message will appear asking if you want to leave the page or stay on the page. Simple yet very useful. Hope you learn from this.