I have this code and it works very well:


window.onbeforeunload = function() {
    if (this.hasUnsavedChanges) {
        return 'you have unsaved changes';


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?


    function() {
        if (this.hasUnsavedChanges) {
            return 'you have unsaved changes.';

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 
For more options, visit this group at 

Reply via email to