Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window.opener.frameElement in Internet Explorer

    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.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    if u give your frame an id and try this
    Code:
    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
    Code:
    var iframe = parent.theframename.window.opener.frameElement;
    Last edited by _Aerospace_Eng_; 02-09-2005 at 01:35 PM.

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    var iframe = window.opener.window.parent.document.getElementById('docktest');

    appears to work, but now a simple:

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


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

    Thanks.

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    you must create or clone an element before append it.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •