Detecting if an iframe's parent has finished loading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Timmy

    #1

    Detecting if an iframe's parent has finished loading

    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.o nload = 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
  • Martin Honnen

    #2
    Re: Detecting if an iframe's parent has finished loading



    Timmy wrote:
    [color=blue]
    > 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.o nload = function() but that does not seem
    > to wait, and then throws a "not implemnted error"[/color]

    In the parent use
    var loaded = false;

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

    --

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

    Comment

    Working...