If user tries to leave unsaved edited form, a message box pop-up
\"This page is asking you to confirm that you want to leave - data you have entered may not be saved. Le
You could use the "onbeforeunload" event. The syntax is as follows:
window.onbeforeunload = function () {
return "Your text string you want displayed in the box";
}
This event will popup that confirmation dialog that you described above asking whether or not the user truly wants to leave the page.
Hope this helps.