How can an applet be modal and not close the IE9 window?

I have a JAVA applet that invokes an application modality dialog. The problem I am facing is that the user can close the browser (or tab) and the dialog will remain. If you click on the IE9 window pane or menu bar, the dialog will appear modally, but when you click on the tabs or the "x" button of the window, IE9 is not modal for the dialog. I have tried various forms of modality, and no one seems to make the whole window and dialog modal. I tried using the window listener in the applet, but it looks like it is not receiving a closing message. If you close windows in this way, the java process does not terminate properly, and you have to kill it through the task manager. I do not remember how this happened with IE8. Is there a way to make the whole IE9 window and my dialog modal?

+4
source share
1 answer

Prior to increasing java modality, could you contact the page through a javacript liveconnect call by setting the window.onclose function, which either focuses on the applet or asks the user for confirmation or warning of the browser?

When you close / dismiss the applet dialog box, you can clear the browser window.onclose function pointer.

Hope this helps,

-Scott H

0
source

Source: https://habr.com/ru/post/1447225/


All Articles