View Full Version : window.opener.frameElement in Internet Explorer

02-09-2005, 12:46 PM
I'm trying to create 'dockable' iframes so that I can pop an embedded iframe out into its own window and back again.

Key to this is to identify the iframe that opened the window, so that I can appendChild() it to the newly opened window.

My demo works in Firefox, but for IE6 I get:
"No such Interface supported"
for the line:
var iframe = window.opener.frameElement;

Anyone know what I'm doing wrong, as opener and frameElement work OK in other IE6 contexts.

02-09-2005, 12:58 PM
if u give your frame an id and try this

var iframe = window.opener.document.getElementById('frameid');
does that work? i know it may not be dom compliant but it may work or u can try this

var iframe = parent.theframename.window.opener.frameElement;

02-09-2005, 01:57 PM
var iframe = window.opener.window.parent.document.getElementById('docktest');

appears to work, but now a simple:

var dock = window.document.getElementById(dockid);

causes another "No such interface supported" for the appendChild, and the browser abends.


02-09-2005, 02:10 PM
you must create or clone an element before append it.