W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: Proposal: Detecting when the user leaves a page due to hitting the back button or typing in a URL or going to a favorite

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 06 Jan 2009 10:15:55 -0500
Message-ID: <496375AB.9030900@mit.edu>
To: "Shropshire, Andrew A" <shropshire@att.com>
CC: public-webapps@w3.org

Shropshire, Andrew A wrote:
> One use case for this is to customize the text in the dialog.  For
> example, right now the developer is forced to use "Are you sure you want
> to navigate away from this page? ... Press OK to continue, or Cancel to
> stay on the current page."
 >
> This doesn't make sense if the user is closing the page.  They are not
> navigating away.

Yes, but they certainly are leaving, and text like:

   You have unsaved changes.  Leaving this web page without saving....

should work just find without giving away the user's private 
information, seems to me.

> Also it would be helpful if there were an dialog box with 3 buttons
> (YES/NO/CANCEL) rather than just (OK/CANCEL)

Yes, agreed.

> Perhaps a confirm2() could be added, someone would
> have to work with ECMA since they manage the javascript standard.

confirm() isn't part of JavaScript.  It's part of DOM0 (like everything 
else dealing with the Window object), and hence managed by this working 
group at the moment.

-Boris
Received on Tuesday, 6 January 2009 15:16:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:29 GMT