0

My main page is from "DomainA" and I have an iFrame within that from "DomainB". The page within the iFrame has an onclick event to open a window, also from DomainB.

I'm trying to update an input field inside the iFrame from the opened window using:

window.opener.document.getElementById('foo').value = 'bar';

This works fine in FF, however in IE I get the error: SCRIPT70: Permission denied

It seems like I'm getting blocked because of the Same Origin Policy, but the page that opens the window, and the opened window are both from DomainB.

I'm using a relative URI within window.open(). Is IE determining domain from the parent of the iframe?

How can I get around this?

Ruxta
  • 696
  • 6
  • 8

1 Answers1

0

Turns out another developer had added the follwing line inside one of the scripts:

document.domain = 'bla.com';

This was causing that behaviour. Please disregard, thx.

Ruxta
  • 696
  • 6
  • 8