UPDATE: I have changed the requirements from APD to Runkit OR APD instead. This gives you 2 options. If you use PHP 4 to 5.1 then using APD is the easier route but I dont have install instructions for that right now. If you use php 5.2 to 5.3 then you will need to use Runkit. I have not been able to get APD to work on anything greater than 5.1 yet so I've decided to include Runkit in the mix to cover all the PHP versions. Runkit does not have the ZendOptimizer compatibility problems that PECL APD has. It also works with php 5.2 and php 5.3 where as APD does not. But it is NOT without it's own problems. It's not really compilable from SVN/CVS nor it's own releases. It has to be patched before it'll even work, the project is a complete mess. So I've done this for you and included it.
The Dirty Forms module provides a javascript behavior that checks forms before users leave the page, warning them if they are about to loose changes and providing an option to remain on the page.
The module provides a configuration form that allows setting up a list of forms that should be excluded from the dirtyForms behavior.
This feature is based on the onBeforeUnload event of the window object which, at the time of writing, is only supported by IE4+, Mozilla Firefox, Google Chrome. Those using other browsers (or when javascript is not enabled) won't be warned when leaving dirty pages. Ah, c'est la vie!
The onBeforeUnload module provides an API to allow other modules use the onBeforeUnload event of the browser window.
This module does not provide any direct functionally, it rather provides a centralized API that other modules can use to take advantage of the onBeforeUnload event of the browser window.