wukong
wukong

Reputation: 2587

IE9 window.opener problem

I have a window A, A will 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.

Upvotes: 1

Views: 2741

Answers (3)

Alvaro Rivoir
Alvaro Rivoir

Reputation: 401

I enabled "Protected Mode" in "Local intranet" settings of the internet explorer (Tools->Internet Options), and worked perfectly.

Regards, Alvaro.

Upvotes: -1

lijaychen
lijaychen

Reputation: 11

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.

Upvotes: 1

wukong
wukong

Reputation: 2587

I solved it by myself, to approach that. I did the following step:

  1. Store a reference of B when B pops up in A

  2. Set a timer in A keep tracking if B's location is readable and the domain is same with A

  3. If B's location.host is readable and same with a again, read the value then close B

Upvotes: 3

Related Questions