Help w/ IE insertBefore problem needed

Discussion in 'Javascript' started by delraydog@gmail.com, Nov 28, 2005.

  1. Guest

    I have the following chunk of code which works fine in FireFox but
    throws an error when run in IE:

    var body=this.myIFrame.contentWindow.document.body;
    var div=document.createElement("div");
    div.innerHTML="TEST";
    body.insertBefore(div,body.firstChild);

    The error is thrown on the insertBefore line. Any ideas?

    Thanks,
    Cliff
    , Nov 28, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Achille

    URGENT: InsertBefore

    Achille, Nov 3, 2004, in forum: Java
    Replies:
    1
    Views:
    411
    Martin Honnen
    Nov 3, 2004
  2. Horny Porno-thologist

    Can't seen to use insertBefore

    Horny Porno-thologist, Jan 28, 2004, in forum: XML
    Replies:
    0
    Views:
    354
    Horny Porno-thologist
    Jan 28, 2004
  3. NotGiven
    Replies:
    0
    Views:
    498
    NotGiven
    Sep 17, 2004
  4. Dante

    Need help with insertBefore

    Dante, Dec 24, 2003, in forum: Javascript
    Replies:
    3
    Views:
    107
    Dante
    Dec 24, 2003
  5. Janis Papanagnou

    Problem with function insertBefore()

    Janis Papanagnou, Dec 22, 2006, in forum: Javascript
    Replies:
    2
    Views:
    79
    Janis Papanagnou
    Dec 22, 2006
Loading...

Share This Page