Is there a JS/JQuery way to find out if embedded objects are loaded?

Posted by Beska on Stack Overflow See other posts from Stack Overflow or by Beska
Published on 2010-06-08T19:24:13Z Indexed on 2010/06/08 19:32 UTC
Read the original article Hit count: 183

Filed under:
|
|

I've got a web page that I'm embedding a pdf into. Conceptually very simple:

<html>
    <body>
        blah1
        <object type="application/pdf" data="a.pdf" width="500" height="650" ></object>
        blah2
    </body>
</html>

What I would like to do is fire a JavaScript event when the pdf finishes loading. Is there a way to make this happen? I know only a little about JQuery, but it looks like .ready() won't fit my needs, since it is designed to fire when the html document is ready, not when all of its components are fully loaded.

Thoughts?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery