CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • ADO.NET Data Services in the .NET Framework
  • Visual C++ Programming: What's new for MFC library in VC++ 2010?
  • Microsoft Visual Studio LightSwitch and What It Can Do For You
  • Displaying Files and Folders in a GridView

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Scripting - Client Side
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Scripting - Client Side Discuss client-side scripting issues. Client-side scripting such as JavaScript, JScript, and VBScript as well as technologies such as HTML and stylesheets.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old February 17th, 2010, 10:51 PM
    answer's Avatar
    answer answer is offline
    Member
     
    Join Date: Mar 2004
    Posts: 218
    answer is on a distinguished road (10+)
    contentDocument.body.appendChild gives error

    I got an iframe of different domain than mine and I got firefox security a little down by setting tis stuff to "allAccess".

    Now I can do frame.contentDocument.createElement("div"); all without any error (not even the permision denied) I can set the innerHTML all fine and dandy. The problem is when I use frame.contentDocument.body.appendChild. I resolved the permision denied issue by enabling firefox policies to allAccess but now I get this error:

    [Exception... "Node cannot be inserted at the specified point in the hierarchy" code: "3" nsresult: "0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR


    I want to append a div to the body of an iframe who's on a different domain. This is firefox specific and I don't care with compatibility. How can I resolve that issue?

    If I can execute javascript within the iframe that would be great. I have no control of coding of the site the iframe display's

    Thank you
    __________________
    01101000011001010110110001101100011011110010000001110011011001010111100001111001
    Reply With Quote
      #2    
    Old February 18th, 2010, 08:15 AM
    PeejAvery's Avatar
    PeejAvery PeejAvery is offline
    Super Moderator
    Power Poster
     
    Join Date: May 2002
    Location: United States
    Posts: 9,580
    PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)PeejAvery has a reputation beyond repute (3000+)
    Re: contentDocument.body.appendChild gives error

    Try...

    Code:
    frame.document.getElementsByTagName("body")[0].appendChild(element);
    __________________
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Scripting - Client Side


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 11:08 PM.



    Acceptable Use Policy

    Internet.com
    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.