문제

I've developed a plugin that open a pop up. Inside this pop up i have a link that clos my pop up and redirect the url of the parent, like this :

window.parent.opener.location = "http://google.fr"; 
or   
window.opener.location =     "http://google.fr";

Both are working but in some versions of IE, they don't. My parent page isn't on the same domain of my children page, but even when it is the case, it still doesn't work. IE puts a message at the bottom asking if I want to let the website do this. I'd like to know if there is a way to force IE to do it by default, without decreasing the security. Thanks.

도움이 되었습니까?

해결책

window.opener won't work in IE under default security level if the child window is from a different domain..

An option is to use location.href to redirect the child window to a page in the domain same as the parent window and then use window.opener

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top