I have this code and it works very well: ++++++++++++++++++++++++++++
window.onbeforeunload = function() { if (this.hasUnsavedChanges) { return 'you have unsaved changes'; } }.bind(this); +++++++++++++++++++++++++++++ But when I try to convert it to Prototype style, it doesn't work. I get no confirmation box asking me if I want to stay on the page. I want to be as cross-browser compatible as possible, so could someone help me do it the Prototype way? ++++++++++++++++++++++++++++ Event.observe( window, 'beforeunload', function() { if (this.hasUnsavedChanges) { return 'you have unsaved changes.'; } }.bind(this) ); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---