prevent web page from closing before it has finished loading
Posted on 2007-11-30
I have a web page that is opening a connection to a crystal report. When the report window is closed, I am closing the connection. However, it is possible for the user to close the window with the x before it finishes loading, in which case the onunload event never fires, which is where I'm closing the connection. Is there a way to prevent the user from closing the window before it finishes. I'm using a synchronous AJAX call to close the connection. An asynchronous call fails because the calling window is destroyed before it finishes.