I am working on a YUI application that requires me to notify the user before closing the window in certain situations. To achieve this, I have implemented a function to capture the window close event:
onWindowClose: function(e) {
if (...)
{
YAHOO.util.Event.preventDefault(e);
}
}
When the user tries to close the window, the browser displays a standard message asking "Are you sure you want to navigate away from this page? Press OK to continue, cancel to stay on the current page". Is there a way for me to customize this message?