|
Posted by Christopher Benson-Manica on October 1, 2004, 10:07 pm
Please log in for more thread options
I have the following document, at http://ataru.gomen.org/file/test.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Hello, world!</h1>
<iframe></iframe>
</body>
</html>
The whole point of <iframe> is to embed a frame in a page, is it not?
But this document is not 4.01 strict, nor is it 4.01 frameset. Can I
use an <object> to get exactly the same effect as the <iframe>, or
must I resign myself to having a non-conforming page?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
|
|
Posted by DU on October 1, 2004, 11:17 pm
Please log in for more thread options
Christopher Benson-Manica wrote:
> I have the following document, at http://ataru.gomen.org/file/test.html:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> >
>
> <html>
> <head>
> <title>Test</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <body>
> <h1>Hello, world!</h1>
> <iframe></iframe>
> </body>
> </html>
>
> The whole point of <iframe> is to embed a frame in a page, is it not?
> But this document is not 4.01 strict, nor is it 4.01 frameset. Can I
> use an <object> to get exactly the same effect as the <iframe>, or
> must I resign myself to having a non-conforming page?
>
I recommend the following when using HTML 4.01 strict, if you must
import, embed an html document within an html document:
<p>
<object data="path/filename.html" type="text/html">
<a href="path/filename.html">Some descriptive title for the link</a>
</object>
</p>
Best is still to avoid embedding html documents within html documents
for numerous reasons: bookmarking, copyrights, usability, navigability,
etc..
DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
|
|
Posted by Christopher Benson-Manica on October 2, 2004, 4:55 am
Please log in for more thread options
> <p>
> <object data="path/filename.html" type="text/html">
> <a href="path/filename.html">Some descriptive title for the link</a>
> </object>
> </p>
Does that give the same effect as the <iframe>? More importantly,
does it work with IE 5.5/IE 6? I read on a message board that
<object> was broken for IE as of sometime last year. I don't know
for sure that I can do that anyway, since the <iframe> is heavily
modified and accessed by JavaScript...
> Best is still to avoid embedding html documents within html documents
> for numerous reasons: bookmarking, copyrights, usability, navigability,
> etc..
That, unfortunately, is not a design decision I can make.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
|
|
Posted by DU on October 2, 2004, 7:21 pm
Please log in for more thread options Christopher Benson-Manica wrote:
>
>
>><p>
>><object data="path/filename.html" type="text/html">
>> <a href="path/filename.html">Some descriptive title for the link</a>
>></object>
>></p>
>
>
> Does that give the same effect as the <iframe>?
You must give width and height value in order to simulate an iframe.
More importantly,
> does it work with IE 5.5/IE 6?
Yes.
I read on a message board that
> <object> was broken for IE as of sometime last year.
You read what exactly on the unidentified message board?
I don't know
> for sure that I can do that anyway, since the <iframe> is heavily
> modified and accessed by JavaScript...
>
Then don't use it.
>
>>Best is still to avoid embedding html documents within html documents
>>for numerous reasons: bookmarking, copyrights, usability, navigability,
>>etc..
>
>
> That, unfortunately, is not a design decision I can make.
>
Well, you can certainly bring good convincing arguments against such:
there are many sites explaining in details what's wrong with iframes,
frames, etc., you know.
DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
|
|
Posted by Christopher Benson-Manica on October 4, 2004, 2:57 pm
Please log in for more thread options
> You must give width and height value in order to simulate an iframe.
> More importantly,
>> does it work with IE 5.5/IE 6?
> Yes.
Okay...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><object> test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
function set() {
window.document.getElementById( 'obj').data="http://www.yahoo.com"; }
//-->
</script>
</head>
<body>
<div>
<object type="text/html" data="" width="400" height="300"
id="obj"></object>
</div>
<script type="text/javascript">
<!--
set();
-->
</script>
</body>
</html>
(http://ataru.gomen.org/files/test.html)
How come IE 6 and Netscape 7.1 fail to behave as I expect, specifically
to load www.yahoo.com in the object tag? Opera 7.54 behaves in that
fashion. I'm posting separately to comp.lang.javascript in case the
script is what's at fault.
> You read what exactly on the unidentified message board?
Someone asked about using <object> instead of <iframe>, and several
people told him that IE's support was broken.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
|
| Similar Threads | Posted | | Mozila Firefox: iframe keep relocate its position when set display block/hiden of another html component? | October 11, 2004, 3:57 pm |
| Iframe | February 17, 2008, 11:27 pm |
like behavior for | August 9, 2004, 12:05 am |
| Problems with iframe tag | September 14, 2004, 6:24 pm |
| Another iFrame question | May 9, 2005, 12:49 pm |
| IFRAME pro contra? | June 11, 2005, 2:00 pm |
| iframe problem | June 27, 2005, 7:10 am |
| July 11, 2005, 5:45 pm |
| October 21, 2005, 5:23 pm |
| iframe drag behind div | June 18, 2006, 7:20 pm |
|