18. January 2008 04:20
I'm constantly amazed when I check my blog stats at how popular an old article I wrote on using Object tags as a replacement for an Iframe has become. This is obviously an area that people are having trouble finding information, so here is a good starting place to find your solution:
First, my original posting - Alternative to < iframe />
And here are two examples, courtesy of W3C, on IFrame versus Object tag:
The basic IFrame example:
<IFRAME src="foo.html" width=400 height=500>
that unfortunately your user agent doesn't support. Alternatively you
can get the related document <a href="foo.html">here</a>.
</IFRAME>
Becomes:
<OBJECT data="foo.html" width=400 height=500>
that unfortunately your user agent doesn't support. Alternatively you
can get the related document <a href="foo.html">here</a>.
</OBJECT>
And the more complex example:
<IFRAME src="foo.html" width=400 height=500 scrolling=auto
frameborder=1>
that unfortunately your user agent doesn't support. Alternatively you
can get the related document <a href="foo.html">here</a>.
</IFRAME>
Becomes:
<OBJECT src="foo.html" width=400 height=500>
<PARAME name=scrolling value=auto>
<PARAME name=frameborder value=1>
that unfortunately your user agent doesn't support. Alternatively you
can get the related document <a href="foo.html">here</a>.
</OBJECT>
You can visit the W3 Frames page, and find IFRAME vs OBJECT about 2/3rds of the way down the document. (It's slightly slanted in favor of IFrame and doesn't explain a lot of the security issues around using IFrame in IE.)
http://www.w3.org/TR/WD-frames-970331