Iframe/Popup redirecting opener window

Posted by Bara on Stack Overflow See other posts from Stack Overflow or by Bara
Published on 2010-06-10T20:58:25Z Indexed on 2010/06/10 21:02 UTC
Read the original article Hit count: 249

Filed under:
|
|
|
|

Hello all,

I have a page located at x.com. On this page is a button that, when clicked, will launch a new window (using javascript's window.open() method) to a page that is located at z.com. The popup does a few things, then redirects the original window (the opener, x.com) to a different page based on some parameters defined in the popup.

This works fine in Firefox/Chrome, but not in IE. In IE (8 specifically, but I believe 7 also has this problem) the original window (the opener) is not redirected. Instead, a new window comes up and THAT window is redirected.

I've tried many different methods to try and get this to work, including changing the popup to an iframe loaded on the page and having a function on the opener that the popup/iframe call. The problem seems to be that IE refuses to allow cross-domain sites to talk to each other via javascript.

Is there a way around this? How can I get the parent window to redirect to a page based on parameters in a popup or iframe?

Bara

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html