| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|