In my MS CRM 4.0-application, there are several things to do before the window is closed. So I have to stop the window from closing in the onbeforeunload-function and do my stuff in different locations. This works already, but only if I show the dialog by returning some message in my onbeforeunload-function and the user chooses "stay on page" (or something like this)
Is it possible to skip this dialog and stop the window from closing?
I know there are several reasons, why this shouldn't work, but, e.g. in my CRM-application it is neccessary.