[whatwg] prompts, alerts and showModalDialog during beforeunload/unload events
jonas at sicking.cc
Thu Feb 11 19:42:32 PST 2010
2010/2/11 Scott González <scott.gonzalez at gmail.com>:
> On Thu, Feb 11, 2010 at 9:55 PM, Tab Atkins Jr. <jackalmage at gmail.com>
>> I commonly see them put to *good* use by editting applications,
>> warning you if you attempt to leave the page without saving. It has
>> saved me from accidentally lost effort just in the past few days in
>> both my email and one of my wikis.
> 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()
Though I'm not sure what exactly Ojan is proposing we forbid?
More information about the whatwg