W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] prompts, alerts and showModalDialog during beforeunload/unload events

From: Scott González <scott.gonzalez@gmail.com>
Date: Thu, 11 Feb 2010 22:57:00 -0500
Message-ID: <9450c5341002111957h1e264a62k9e3b3b04e095e1f0@mail.gmail.com>
2010/2/11 Jonas Sicking <jonas at sicking.cc>

> 2010/2/11 Scott Gonz?lez <scott.gonzalez at gmail.com>:
> > I use dialogs in this fashion as well. Users get very frustrated when
> they
> > accidentally leave a page with unsaved content and this is the easiest
> > improvement for most developers to make.
>
> However you can accomplish this using the onbeforeunload return value.
> No need to open modal dialogs using showModalDialog/input()/alert()
> etc.
>

You're correct and that's actually what I do. I didn't realize Ojan wasn't
talking about this, even though the subject makes that pretty clear.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100211/5ed5b4d8/attachment.htm>
Received on Thursday, 11 February 2010 19:57:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC