logo       

Re: "iframe" and dom problem: msg#00004

web.dom.general

Subject: Re: "iframe" and dom problem


June Lee wrote:

self.document.getElementById("myEmbed").contentDocument.lastModified
: self.document.getElementById("myEmbed").contentDocument means
document object of "myEmbed" element. it is document object.
(DOM Level 2, works in Mozilla not in [IE]).
self.document.getElementById("myEmbed").document.lastModified
: self.document.getElementById("myEmbed").document means
document object of "myEmbed" element. it is document object.
(DOM Level 2, works in IE. not in Mozilla).

Actually the latter will not work in IE. That will access the lastModified property of the *current* document (in which the object resides). Currently there is no direct way (through the properties of the object) in IE of accessing the document of a page loaded into an object via the data attribute. As noted by a forum post [1], the window of the document loaded into the object is included in the window.frames collection. This is not much use to you, however, in XHTML 1.0 Strict.

My conclusion is that <object> support simply isn't consistent or mature enough to be used as a universal solution. Instead, I would recommend use of XHTML 1.0 Transitional for pages that require iframes, as the <iframe> element is much more well-supported.

[1] - http://www.webmasterworld.com/forum21/6539.htm

--
Brad Fults
NeatBox





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise