Index: branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js =================================================================== diff -u -r6905 -r6906 --- branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (.../script.js) (revision 6905) +++ branches/unlabeled/unlabeled-1.2.2/core/admin_templates/js/script.js (.../script.js) (revision 6906) @@ -1178,10 +1178,18 @@ { var $main_window = window; - while ($main_window.opener) { - // cycle through popups to get main window - $main_window = $main_window.opener; + // 1. cycle through popups to get main window + try { + // will be error, when other site is opened in parent window + while ($main_window.opener) { + $main_window = $main_window.opener; + } } + catch (err) { + // catch Access/Permission Denied error +// alert('getFrame.Error: [' + err.description + ']'); + return window; + } var $frameset = $main_window.parent.frames; for ($i = 0; $i < $frameset.length; $i++) { Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/close_popup.tpl =================================================================== diff -u -r6892 -r6906 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 6892) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 6906) @@ -14,12 +14,18 @@ } function proceed_redirect() { - if (window.opener) { // using popups & close_popup called (from anywhere) - window.opener.location.href = $redirect_url.replace('%5C', '\\'); - window.close(); - window.opener.focus(); + try { + // parent window is ours + window.opener.location.href = $redirect_url.replace('%5C', '\\'); + window.close(); + window.opener.focus(); + } + catch (err) { + // another website is opened in parent window +// alert('proceed_redirect.Error: [' + err.description + ']'); + } } else if (!$use_popups) { // not using popups (for editing), but close_popup called (e.g. from selector)