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

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top