Changing the address of the opening window in IE8

From the popup of a child (opens with window.open), I am trying to change the URL of the popup, for example.

window.opener.location.href = ' http://www.google.com ';

In all browsers, this works just fine, with the exception of IE8 (and I'm sure it worked in previous IE8. Perhaps a security update kills this).

In IE8, what happens is that the line above is considered as a request to open a NEW window with an address, and the original window of the opening window remains unchanged. And, since I do not put this line inside the onclick event, this is seen as a popup.

So how do I do this in IE8? How to change the location of the opener?

+4
source share
3 answers

It seems like it's just not possible. I have not received anything from anyone, and all my research has shown that this is another way to add MS to block pop-ups.

+1
source

try moving the action to the parent window, for example:

//parent.htm function changeUrl(url) { location.href = url; window.reload(); } window.open("child.htm"); ..... //child.htm window.opener.changeUrl(url); 
+1
source

try the following: in the opening window, define a function called goto; -)

 function goto(url){ window.location.href = url; } 

now from the call of the child window window.opener.goto(url);

0
source

All Articles