Determine if a window was opened window.showModalDialog?

Does anyone know how to find out if window.showModalDialog() opened? window.opener returns the parent window when window.open() opens, but for some reason, when you use window.showModalDialog() , window.opener returns as undefined. JQuery solutions are also welcome.

+4
source share
1 answer

You can check if window.dialogArguments is defined :

 function isModalWindow() { return (window.dialogArguments != null); } 
+4
source

All Articles