I'm opening a new "window.open" html page from a "main" html page, and the opened window is then supposed to set a field in the main window, and trigger the change event for that field.
This works perfectly well in Chrome and Firefox and in all IE versions apart from IE11.
Chrome and Firefox does of course not support the fireEvent() method, so I use dispatchEvent() for event triggering.
IE versions before IE11 support the fireEvent() method, and I use that for event triggering. All ok.
IE11 however does not - and dispatchEvent() seems to be buggy (see below)
Possibly, the same error exists in IE9 and IE10 (which support dispatchEvent as well) but if so, that's not a problem as fireEvent works ok in IE9 and IS10.
Ok - so the problem is the following.
I attach two files fire.htm and fire2.htm
When opening fire.htm, one can click on the link "Click to trigger event" to trigger a change event.
This works perfectly well i ALL browser, including IE11.
However, if one instead clicks on the link Click to open new window", a new window (fire2.htm) is opened.
If one clicks on the link "Click to trigger event in the main window" in this "child window", then an event is triggered on a field in the "parent windows".
This works perfectly well on all browsers apart from IE11!
The problem in IE11 is that dispatchEvent() seems to break with an error when the target does not exists in the same document - but instead in the parent window.
Does anyone recognize this? Any ideas on cause and any suggestions on a workaround solution?