OK this is a pretty slick solution. I am going to defer the full solution to someone that I work with. I thought is was worth mention/remembering here because it is slick, and useful.
The Requirement: Warn a user that tries to navigate away from a page that content has changed on the page (of course if they changed anything)
The solution: JQuery goodness.
In essence the solution revolves around JQuery, adding events to input fields and using CSS classes to track state.
In a nutshell..
For any input field on a form, wire up a change event. On the change add a CSS style that indicates something changed.. On submit check if any fields on a form have CSS style that indicates if something changed. If they do warn the user.
Here is the implementation
http://robfuller.blogspot.com/2009/07/automatically-determine-if-there-is-any.html
Nice solution, elegant, and easy to implement.
