473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

iframe and onload

Hi. Is iframe supposed to have an onload event? Many documents in
google have examples of this method. It works in Mozilla 2. However,
http://www.w3schools.com/TAGS/tag_iframe.asp does not have it. If it
not supposed to be there, why is that, and what is the workaround?
Sep 12 '08 #1
4 3235
In article
<f7**********************************@1g2000pre.go oglegroups.com>,
"re*************@yahoo.com" <re*************@yahoo.comwrote:
Hi. Is iframe supposed to have an onload event? Many documents in
google have examples of this method. It works in Mozilla 2. However,
http://www.w3schools.com/TAGS/tag_iframe.asp does not have it. If it
not supposed to be there, why is that, and what is the workaround?
You could always go to the source:
http://www.w3.org/TR/html401/present/frames.html#h-16.5

Note that w3schools.com != w3.org...
Sep 12 '08 #2
On Sep 12, 11:22 am, David Stone <no.em...@domain.invalidwrote:
You could always go to the source:
http://www.w3.org/TR/html401/present/frames.html#h-16.5
All right, so onload is not part of iframe. Any reasons why that
might be?
Sep 12 '08 #3
On Sep 12, 10:40 am, "removeps-gro...@yahoo.com" <removeps-
gro...@yahoo.comwrote:
Hi. Is iframe supposed to have an onload event? Many documents in
google have examples of this method. It works in Mozilla 2. However,http://www.w3schools.com/TAGS/tag_iframe.aspdoes not have it. If it
not supposed to be there, why is that, and what is the workaround?
The other strange thing about iframe, at least on my browser, is that
it must have body content.

That is

<iframe id="myframe" frameborder="1" marginheight="-10"
marginwidth="0" src="test1.html" style="display:block; margin-bottom:
3em" onload="myframeFullHeight()"/>

does not display right on Mozilla 2. Everything after the iframe is
cut out. But

<iframe id="myframe" frameborder="1" marginheight="-10"
marginwidth="0" src="test1.html" style="display:block; margin-bottom:
3em" onload="myframeFullHeight()"></iframe>

does work
Sep 15 '08 #4
re*************@yahoo.com wrote:
On Sep 12, 10:40 am, "removeps-gro...@yahoo.com" <removeps-
gro...@yahoo.comwrote:
>Hi. Is iframe supposed to have an onload event? Many documents in
google have examples of this method. It works in Mozilla 2. However,http://www.w3schools.com/TAGS/tag_iframe.aspdoes not have it. If it
not supposed to be there, why is that, and what is the workaround?

The other strange thing about iframe, at least on my browser, is that
it must have body content.

That is

<iframe id="myframe" frameborder="1" marginheight="-10"
marginwidth="0" src="test1.html" style="display:block; margin-bottom:
3em" onload="myframeFullHeight()"/>

does not display right on Mozilla 2. Everything after the iframe is
cut out. But

<iframe id="myframe" frameborder="1" marginheight="-10"
marginwidth="0" src="test1.html" style="display:block; margin-bottom:
3em" onload="myframeFullHeight()"></iframe>
It doesn't have content either way you used it above. Content would be
what you put *between* the tags, if you had put anything there. Yes, the
end tag is required, and unless you're delivering your page as XHTML,
the trailing slash is meaningless to the browser, so that <tag/is
identical to <tagfrom its perspective.

Further, if you did include content in your iframe, it would display in
a conforming browser if the browser didn't support iframes or if it were
configured not to display them. See

http://www.w3.org/TR/html401/present/frames.html#h-16.5
Sep 15 '08 #5

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

Similar topics

3
by: alejandro.rivero | last post by:
In Mozilla, the following code seems to resize correctly the IFRAME, so no scroll bars: <iframe marginwidth=0 marginheight=0 src=text.html onload="this.height= this.contentDocument.height">...
2
by: Rich | last post by:
Is there any way I can check to see if a document is loaded into the iframe before I call onLoad (sort of an afterLoad). I'm loading up a page into an iframe. But because we use four servers...
4
by: Mark | last post by:
I am loading source files into several iframes, with each load happening after some user-generated event (like clicking a button). The loading works but I need to determine when the source file is...
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
6
by: ok | last post by:
<img src="http://www.6park.com/enter2/av.gif" onload="document.write('an iframe obj');"> First of all, it destroy the HTML page. Secondly even if it does not destroy it, the iframe object will...
3
by: Asterbing | last post by:
Since the "on fly addition..." thread has taken another direction, I'm opening a new one to be more explicit and recenter the subject. Well, the subject is to detect when a document is well...
4
by: Drew | last post by:
This might beyond the scope of this group because it deals with SharePoint, but I'm not sure if I can't get it to work because of SharePoint or because JavaScript is weird (I don't have much...
7
by: Tom Cole | last post by:
IFrames have been used by years for people to accomplish many of the tasks the XMLHttpRequest does for them now...I unfortunately am late in the game and XMLHttpRequest was already out there by the...
3
polymorphic
by: polymorphic | last post by:
I have succeeded in embedding PDF files in a dynamic iframe. The problem is that I need the PDF to cache. If the PDF remains the same from page load to page load then the pdf is somehow cached with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.