IE9 window.opener problem
I have a window A
, A
will开发者_StackOverflow pop a window we called B
, B
will submit data to server, and then redirect B
to domain same with A
.
My question is at the last step,seems when the server does 302 redirect, the window object in B
will lost the opener property under IE. how do i solve it? thanks for advice
Update:
What i want to do is, when B
redirect back to the same domain as A, B
will transfer some data to A
. I must use 'B'.opener to get a reference of A
. It works as expected in chrome but not in IE.
I solved it by myself, to approach that. I did the following step:
Store a reference of B when B pops up in A
Set a timer in A keep tracking if B's location is readable and the domain is same with A
If B's location.host is readable and same with a again, read the value then close B
I found the same question (maybe) on my test site with IE9. but it's running correctly on my production site with the same code.
And I found that if A and B are running with different IE security settings (in my case A is local network, B is internet ) , it will cause this problem.
If I change IE security settings, let A became to internet settings, no this problem any more.
I enabled "Protected Mode" in "Local intranet" settings of the internet explorer (Tools->Internet Options), and worked perfectly.
Regards, Alvaro.
精彩评论