Warn the user before navigating away from a web page using JavaScript
In rich client applications, it is easy to check to see if a document has been modified and react when the user closes the program or document. Not so easy with web pages.For example, when you close Microsoft Word without saving, you get a warning and the option to save.How can this be...