Connecting Tech Pros Worldwide Help | Site Map

iframe and onload

  #1  
Old September 12th, 2008, 06:45 PM
removeps-groups@yahoo.com
Guest
 
Posts: n/a
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?
  #2  
Old September 12th, 2008, 07:45 PM
David Stone
Guest
 
Posts: n/a

re: iframe and onload


In article
<f78a683a-618e-4bab-91f7-ab629c3f80cf@1g2000pre.googlegroups.com>,
"removeps-groups@yahoo.com" <removeps-groups@yahoo.comwrote:
Quote:
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...
  #3  
Old September 12th, 2008, 11:45 PM
removeps-groups@yahoo.com
Guest
 
Posts: n/a

re: iframe and onload


On Sep 12, 11:22 am, David Stone <no.em...@domain.invalidwrote:
Quote:
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?
  #4  
Old September 16th, 2008, 12:05 AM
removeps-groups@yahoo.com
Guest
 
Posts: n/a

re: iframe and onload


On Sep 12, 10:40 am, "removeps-gro...@yahoo.com" <removeps-
gro...@yahoo.comwrote:
Quote:
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
  #5  
Old September 16th, 2008, 12:55 AM
Harlan Messinger
Guest
 
Posts: n/a

re: iframe and onload


removeps-groups@yahoo.com wrote:
Quote:
On Sep 12, 10:40 am, "removeps-gro...@yahoo.com" <removeps-
gro...@yahoo.comwrote:
>
Quote:
>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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
iFrame onLoad Problem whatever0 answers 3 September 13th, 2007 06:51 PM
IFrame.onload, IE and Remote Scripting Tom Cole answers 7 March 24th, 2007 01:15 PM
DIV and IFRAME onload dimepiece18 answers 0 July 28th, 2006 05:03 PM
ONLOAD is there an afterLoad alternative (Iframe problem) Rich answers 2 July 23rd, 2005 11:26 AM