OZONE Asylum
Forums
Stupid Basic HTML
How to tell when a child iframe has "loaded"
This page's ID:
22500
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[b]whisperstom:[/b] You shouldn't attach the events on the iframe itself but on/in its own document, body, ... just like any page. If the location of the iframe is on the same domain as that of the main window, it's possible to attach an onload event on the iframe via JavaScript. Otherwise it's not possible for security reasons. Whatever, for the iframe, the main window IS its [i]parent[/i] so you the function called onload in the iframe can do things on its [i]parent[/i]. For example, the source code of the page in the iframe could look like :[code]<script type="text/javascript"> function doSomethingToParentWindow() { parent.document.body.style.backgroundColor = "pink" } </script> <body onload="doSomethingToParentWindow()" >...[/code]Like I just said in [22505], you must use the [url=http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html]window[/url] object and its properties like [i]parent[/i], [i]top[/i], [i]frames[/i], ... Hope that helps, [url=http://www.p01.org/] [img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_love.gif[/img] [/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »