开发者

How to detect the load event of iframe which is inside a html scope from the outside of iframe(parent html)

开发者 https://www.devze.com 2023-01-25 23:02 出处:网络
a few notes: 1.i can not modify the iframe content to add the onload= function 2.the iframe has an id. 3.the iframe has no callback to its parent html page.

a few notes:

  • 1.i can not modify the iframe content to add the onload= function
  • 2.the iframe has an id.
  • 3.the iframe has no callback to its parent html page.
  • 4.I use the prototype ,not jquery, for some old reasons.

    i wanna do something when the iframe load finished. but, i have tried the

    document.observe('dom:loaded',function() {

        alert($('iframe-id'));  >> **IS NULL**
    

    })

and

Event.observe(window,'load',function(){..
alert($('iframe-id'));  >> **IS NULL开发者_StackOverflow社区 STILL**

...})

Did i miss some methods in prototype or javascript?

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消