there is an "onbeforeunload" event you can use http://www.google.com/search?q=javascript+onbeforeunload&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
- [jQuery] Call a function just before the window close rics
- [jQuery] Re: Call a function just before the window clos... MorningZ