I need some assistance regarding the use of standard onbeforeunload or onunload events.
I have created an application that uses PHP sessions for users to login in which it includes a "logout" option to exit the website (destroying the session).
However I need to be able to control when user clicks the browser's Close Button (X), so that I can activate a MessageBox confirmation advising the user correctly.
I tried using Ext.EventManager registering the "beforeunload" event. It helps me control the closing action, but it displays the default confirm message from the browser:
"Are you sure you want to navigate away from this page?... Press OK to continue, or Cancel to stay on the current page."
According to some forums, this message is not able to be changed programmatically, but probably if I let this being managed like this, my users will get confused...
Another thing is that "beforeunload" is not being activated in other browsers like Opera (vers. 11.01)
Is there some special feature or event in ExtJS that can help me out with this like the one included on the Dojo Toolkit framework [dojo.addonUnload]?