I want to pick your collective brains on how to do something:

I have a page that has about 10 fields for display/edit.

If a user edits any of the data in any way, and trys to navigate away before saving I want a message to display saying "would you like to save your edits, yes (saves), no ignores.

Is there an easy way to do this?