views:

294

answers:

1

I have a YUI application. Under certain circumstances I want to alert the user before he closes the window. Therefore I capture the window close event and do

onWindowClose: function(e) {
     if (...)
     {
      YAHOO.util.Event.preventDefault(e);
     }
    }

The browser shows a standrd message: "Are you sure you want to navigate away from this page? Press OK to continue, cancel to stay in the current page".

How can I customize the message the browser shows?