logo       

Re: Order of onload events: msg#00034

mozilla.devel.dom

Subject: Re: Order of onload events



Jiri Znamenacek wrote:

If I have the page with IFRAME and the document loaded into IFRAME is on onload calling a script in the main page (the page containing the IFRAME), will this script be already accessible? (Well, typically the script will be parsed before IFRAME tag, but I don't know if I can take it for sure that onload on IFRAMEd document will always succeed.)

If the <script> element is before the <iframe> element in your source HTML document then I think you can assume that the script content is parsed and function/variables are available to the onload handler of the iframe's document. The exception is
<script defer type="text/javascript">...</script>
but only IE supports that currently, Mozilla and Opera do not.

--

Martin Honnen
http://JavaScript.FAQTs.com/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise