473,804 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

iframe and HTML 4.01

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)cybers pace.org | don't, I need to know. Flames welcome.
Jul 23 '05
28 4123
Spartanicus wrote:
You forgot?
The specifics - yes.
And you base this "less well supported" claim on?


My experiences trying it a few years ago. I might have forgotten the
specifics, but I still remember the conclusion.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #11
David Dorward <do*****@yahoo. com> wrote:
And you base this "less well supported" claim on?


My experiences trying it a few years ago. I might have forgotten the
specifics, but I still remember the conclusion.


Can you remember if you specified a width and height? This is a common
mistake that leads people to think that IE doesn't support it since it
collapses the element to 0 (whereas other UAs may default to a non zero
value).

--
Spartanicus
Jul 23 '05 #12
In article <mp************ *************** *****@news.spar tanicus.utvinte rnet.ie>,
Spartanicus <me@privacy.net > writes:
Can you remember if you specified a width and height?
Specifying width and height on an embedded text page (eg html) would of
course be totally bogus.
This is a common
mistake that leads people to think that IE doesn't support it since it
collapses the element to 0


That's a *critical* bug. Bottom line: IE screws up object except under
some very limited circumstances. Note screws up - simply not supporting
it would be fine if it showed the alternative content (like Lynx or
early Netscape).

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/
Jul 23 '05 #13
ni**@hugin.webt hing.com (Nick Kew) wrote:
Can you remember if you specified a width and height?


Specifying width and height on an embedded text page (eg html) would of
course be totally bogus.


A width and height must be specified as attributes to the object
element, not the embedded page.
This is a common
mistake that leads people to think that IE doesn't support it since it
collapses the element to 0


That's a *critical* bug. Bottom line: IE screws up object except under
some very limited circumstances. Note screws up - simply not supporting
it would be fine if it showed the alternative content (like Lynx or
early Netscape).


Unlike for example images, replaced content such as HTML has no
intrinsic width and or height, so there's nothing incorrect about IE
collapsing an object element to 0 if no width & height are specified.

--
Spartanicus
Jul 23 '05 #14
Nick Kew wrote:
Bottom line: IE screws up object except under some very limited
circumstances.


IE's support for <object> ain't too bad. It's not great, but it does for
most purposes. The following certainly all work:

<object data="foo.html" height="150" width="300">
<a href="foo.html" >foo.html</a>
</object>

<object data="bar.jpeg" height="150" width="300">
<img src="bar.jpeg" alt="a bar" height="150" width="300">
</object>

<object data="quux.swf" height="150" width="300">
<img src="quux.gif" alt="Quux Corp" height="150" width="300">
</object>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #15
Toby Inkster <us**********@t obyinkster.co.u k> wrote:
Bottom line: IE screws up object except under some very limited
circumstances.
IE's support for <object> ain't too bad. It's not great, but it does for
most purposes. The following certainly all work:

<object data="foo.html" height="150" width="300">
<a href="foo.html" >foo.html</a>
</object>


Work as in it displays the content, for the embedding to work it
requires the type attribute to be specified.
<object data="bar.jpeg" height="150" width="300">
<img src="bar.jpeg" alt="a bar" height="150" width="300">
</object>
Here again IE renders the content, and although optional, omitting the
type attribute forces other UAs to retrieve the data even if the content
type is not supported/enabled. Add the type attribute and IE screws up.
There's also the issue that the same image is not the textual
alternative to the image specified as data to the object element.
<object data="quux.swf" height="150" width="300">
<img src="quux.gif" alt="Quux Corp" height="150" width="300">
</object>


Again IE renders the content, the embedding doesn't work (type attribute
again).

--
Spartanicus
Jul 23 '05 #16
"Christophe r Benson-Manica" <at***@nospam.c yberspace.org> a écrit dans
le message de news:cj******** **@chessie.cirr .com
I have the following document, at
http://ataru.gomen.org/file/test.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.


iframe is included in HTML 4.01 transitionnal. Why don't use it ?

Jul 23 '05 #17
DU <dr*******@hotn ospammail.com> spoke thus:
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>&lt;obje ct&gt; 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="ht tp://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.javas cript 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)cybers pace.org | don't, I need to know. Flames welcome.
Jul 23 '05 #18
In article <4i************ *************** *****@news.spar tanicus.utvinte rnet.ie>,
Spartanicus <me@privacy.net > writes:
Specifying width and height on an embedded text page (eg html) would of
course be totally bogus.
A width and height must be specified as attributes to the object
element, not the embedded page.


That is totally and utterly nonsensical when the contents of the
object don't have dimensions. As in the case of an HTML page or
other text document. An author might want to suggest a size under
some circumstances, but that's not a general case.
Unlike for example images, replaced content such as HTML has no
intrinsic width and or height, so there's nothing incorrect about IE
collapsing an object element to 0 if no width & height are specified.


So it's OK to defeat both an authors and a readers expectations and
hide both the object contents and the alternative contents, without
even alerting the reader to its existence?
I thought you had more commonsense!

The specs of course leave the browser some discretion over how to render
an object, but denying its very existence doesn't seem to me a valid
implementation unless you at least render the alternative contents.

--
Nick Kew

Nick's manifesto: http://www.htmlhelp.com/~nick/
Jul 23 '05 #19
ni**@hugin.webt hing.com (Nick Kew) wrote:
Specifying width and height on an embedded text page (eg html) would of
course be totally bogus.


A width and height must be specified as attributes to the object
element, not the embedded page.


That is totally and utterly nonsensical when the contents of the
object don't have dimensions.


1) An "object's content" is that what is between the element's opening
and closing tag.
2) Nope, quite the other way around.
Unlike for example images, replaced content such as HTML has no
intrinsic width and or height, so there's nothing incorrect about IE
collapsing an object element to 0 if no width & height are specified.


So it's OK to defeat both an authors and a readers expectations and
hide both the object contents and the alternative contents


1) It is 100% spec compliant.
2) Again: an "object's content" is that what is between the object
element's opening and closing tag.
3) IE "hiding" the "alternativ e content" is a must per spec since it
supports the object's data.

--
Spartanicus
Jul 23 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1897
by: dj | last post by:
Hi, Anyone have a snippet of code that will guide me as follows; I want to use an iframe but if the browser does not support iframes I want to simply replace the iframe HTML code with the URL which will be in the iframe. I'll probably detect the browser to make the switch.
1
6833
by: Silver Arrow | last post by:
Iframe ReturnValue returns undefined if domains are not the same I am using a modal window and an iFrame to try and pull a return value back. IMPORTANT : I am doing this across domains. Main app: http://webSite1.domain.com/mainApplication Other app call in ModalWindow: http://webSite2.domain.com/mainApplication I have the value returned from the modal window to the iFrame window
5
15948
by: Peroli | last post by:
Hi all, I have an iframe as stated below. When i initiate the function "open_frm()" everything is working as i expected. When the document is loaded, i click on a link in the iframe, with posts some data to the server (to url "myscript.peroli?q=something") and gets back with results. Everything happens inside the iframe, no interaction with parent window. But when i do this 2 or more times, mozilla and IE is giving me a
8
13486
by: djdave | last post by:
Pb with javascript. I've a 'main.html' script containing an 'iframe.html' IFRAME. The 'iframe.html' is containing a form. My problem is that i'm unable to get form fields values. What's the syntax ??? NB: the script has to be generic, because it has to work with any .html (i may don't know form's name and iframe's name). Thanks
24
5259
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C# Web Form). Is there any other method through which I will be able to access the IFrame Source of the page I am navigating to. Also I need to click on some of the links in the page I am navigating. Requirement is to read the data the IFrame source...
4
4171
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This works real good. Since I don't need the aspx page to do any postback, is there a way to pass a parameter to it with out it finishing the round trip back to the htm page? Thanks. -- moondaddy@newsgroup.nospam
9
18494
by: jad2006 | last post by:
Hi guys We have a requirement like in one iframe we have to show one site and in another iframe we have to show some other external site, we did it using <iframe src="http://www.a.com"> </iframe> <iframe src="http://www.b.com"> </iframe> now if the session expires in any one site, the login page is shown in only the correponding iframe, what we require is that the login page has to be shown in the entire window(since both...
5
5543
victorduwon
by: victorduwon | last post by:
Hi guys, I wanted to know if anyone knew if it was possible to use iframe to view only a particular section of a site in another page. I ask because I want to view only the body of a particular site without the header and footer or ads on another site. The site in question is public domain, so there are no copyright issues. I thought of using iframe, but I don't know if it it possible to do so and only view certain parts of the site. ...
23
6638
by: vunet | last post by:
It is recommended by some sources I found to create IFrames in IE using document.createElement('<iframe src="#">') instead of document.createElement('iframe'). Why and what browser versions to use it? IE5 or IE6? Thanks
1
1781
by: metomeya | last post by:
I was wondering what the code would be to have 3 different submit buttons that would change the website iframe (or a css box) web page being displayed. thanks
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.