mootools/mootools-core — Issue #2214: IE8 - Cannot inject into window.opener
Author: ibolmo
Created: 2012-01-19 07:52:14+00:00
State: open
Labels: bug

(from [Lighthouse](https://mootools.lighthouseapp.com/projects/2706/tickets/929-ie8-cannot-inject-into-windowopener))

I have a page that opens a popup. From that page, I grab several values from the previous and the user picks which records to save. After clicking Save, it changes a variable to false onthe parent (window.opener), calls a function, injects a hidden element (to simulate the Submit button being clicked), and submits the form. In some cases, the popup will not be opened, so the actual submit button would be functional.

It works fine in Firefox 3.6.3, but not in IE 8.0.6001.18702. I've attached a zip file that is a very simple example which also worked/didn't work like the above version I described.

To make sure IE didn't block the popup from creating an element, I used window.opener.document.createElement('input'), set the correct attributes (setAttribute), and appended the element using appendChild. That worked, so I think inject needs a bit of work.

[Attached file](https://mootools.lighthouseapp.com/projects/2706/tickets/929/a/557827/test.zip)