I suspect what you want is actually the 'onbeforeunload' event. If you return a string from that function, both ie and firefox will pop up a dialog with the string, and an ok or cancel to close the page.
Hope that helps, Jon jfagnani wrote:
I'm trying to wire up a warning when the user is about to close a window with unsaved changes. My first attempt: using connect(window,'onclose',... isn't working and I can't find something obvious through Google. Can someone tell me if I'm missing something. Does MochiKit support the onclose event? Thanks, Justin
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
