views:

154

answers:

0

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