Permission Denied error in IE when closing popups

Posted by Kenia on Stack Overflow See other posts from Stack Overflow or by Kenia
Published on 2010-05-25T15:50:03Z Indexed on 2010/05/25 15:51 UTC
Read the original article Hit count: 181

Filed under:
|
|

Hi everyone!

I have a simple web testing application which is supposed to open and close several popups by itself (without user interaction). For this purpose i have a javascript function to access the variable where the popup reference is stored and close it if it´s not null, fairly simple. However I get random errors in IE (in FF it works as expected, all popups are closed correctly) like

Message: No such interface supported
Line: 86
Char: 3
Code: 0
URI: http://10.10.0.61:10000/savmailer/adm/tests/common_tests_code.js

and

Message: Permission denied
Line: 86
Char: 3
Code: 0
URI: http://10.10.0.61:10000/savmailer/adm/tests/common_tests_code.js

The line 86 references exactly the point at which I do popup.close(); in the following function

function closePopupWindow(popup){
 if (popup != null) {
  popup.close();
  popup = null;
 }
} 

I have googled and it seems this permission denied error is quite common to come through among IE developers, however there´s no clear solution for it, it´s just a matter of changing the code slightly "to please" IE, so to speak. However i have no idea how to change mine since it´s just 3 lines! Tried also to change the security browser settings by adding my domain to the trusted zone, but nothing, doesn't help either. If anyone has any helpful idea or notices something i might be forgetting, please, reply to this!

Thanks in advance,

Kenia

© Stack Overflow or respective owner

Related posts about error

Related posts about ie