Forum Moderators: open

Message Too Old, No Replies

Safari (MAC) + innerHTML

1.3 vs. 2.0.4

         

AllSeeingI

7:52 pm on Sep 22, 2007 (gmt 0)

10+ Year Member



Hi everyone!

I have a html page with an IFrame; and the following code:

var doc = document.getElementById("iframe_id").contentDocument;
doc.body.innerHTML = htmlCode;

This code is run in body's onload handler. 'htmlCode' contains some (very simple) html (it is a string, of course).

I was able to test this code only in Safari 1.3 (Mac), and it didn't work :(

BUT: I need to test it in a Safari 2.0.4. Unfortunatelly, I don't have access to it. Anyone (with Mac) can tell me if it will work?

And why the above code didn't work with Safari 1.3? Is it possible to fix it?

daveVk

1:43 am on Sep 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



contentDocument is not supported by all browsers, not sure situation with Safari see [webmasterworld.com...]