SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Iframe parent window and IE
-
Aug 22, 2008, 15:07 #1
- Join Date
- May 2004
- Location
- Richmond, VA, USA
- Posts
- 819
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Iframe parent window and IE
The following code is in an iframe. In the parent window the div "inline_images" should have the image from this script appear. Works great in Firefox, but IE vomits.
Error:Invalid Argument
Code JavaScript:var new_image = document.createElement('img'); new_image.setAttribute( "src", "./images/small/filename.jpg"); var imagebox = window.parent.document.getElementById('inline_images'); imagebox.appendChild(new_image); // <--------------- IE Error is here :(
Help!
-
Aug 22, 2008, 15:46 #2
- Join Date
- May 2004
- Location
- Richmond, VA, USA
- Posts
- 819
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I fixed it using innerHTML instead of appendChild and it works now. I guess that's why people complain about IE having no love for the DOM.
Bookmarks