I have a page which has an Iframe. In that Iframe, there are six iframes. When I use
window.onload
or
document.observe(window, 'load', func) // of PrototypeJs,
does it mean that all the contents of Iframe and the other 6 iframes’ content have been loaded?
If the answer is not, then how can I be sure that all my iframes content have been loaded.
[The iframes inside the iframe does not have any src. I am filling those Iframes from database content.]
Thanks.
Resources in iframes/frames live in their own context and you can´t use window.onload in the parent document. Every document in the frames need to tell the parent document that they have loaded.
One way to do this is have isLoaded flags in the parent document set to a falsy value and a window.onload event in every child document setting their isLoaded flag to truthy. Having a setInterval in the parent document checking these flags and once all are set do what you want.
There are probably a million better solutions ^^ I just suggest a rough blueprint.