Detecting if an iframe's parent has finished loading

T

Timmy

Hi,

I have some javascript that is within an iframe's src, however I do
not want to execute it until the iframe's parent has finished loading.

I have tried parent.window.onload = function() but that does not seem
to wait, and then throws a "not implemnted error"

If any one can help it is greatly appreciated.,

Thanks,
Tim
 
M

Martin Honnen

Timmy said:
I have some javascript that is within an iframe's src, however I do
not want to execute it until the iframe's parent has finished loading.

I have tried parent.window.onload = function() but that does not seem
to wait, and then throws a "not implemnted error"

In the parent use
var loaded = false;

<body onload="loaded = true;">
then check
if (parent.loaded)
from the iframe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top