Yes, it works.


On 1/19/07, Sam Collett <[EMAIL PROTECTED]> wrote:

On 19/01/07, Unai Martinez <[EMAIL PROTECTED]> wrote:
> I get it working, without jquery :: window.onbeforeunload =
> function(){return "Unsaved changes."}
> Thx.

Perhaps it should be filed as a bug?

$(window).bind("beforeunload", function(){return "Unsaved changes."; });

The above 'sort of' worked in jQuery 1.0.2 tested - you got the dialog
box, but the text "Unsaved changes" was not shown. Now it doesn't work
this way in jQuery 1.1 at all.

This does work though:

$(window).bind("beforeunload", function(e){e.returnValue = "Unsaved
changes."; });

jQuery mailing list

Unai Martinez
jQuery mailing list

Reply via email to