[thelist] jquery and iFrame loading complete

kasimir-k kasimir.k.lists at gmail.com
Thu Jun 3 10:50:51 CDT 2010

Scott Brady scribeva in 2010-06-03 17:46:
> I have an iFrame that does some processing that doesn't generate any HTML
> output.  It processes a data export and then delivers that file to the user.
> What I'd like to do is run some JS processing in the parent document once
> the processing is done (I can't really add any javascript inside the iframe,
> because it's not loading HTML.).  I thought I could attach a function using
> .ready(), but that seems to fire immediately, even if the processing isn't
> done yet.  I tried adding an onload in the iframe tag directly, but that
> doesn't seem to fire in this case (if the iframe generates HTML output, it
> does).
> I tried changing the .ready() to a .load() but it doesn't fire at all (nor
> does the inline onload when the processing runs).
> Any ideas?

I think that iframes fire load event when the document they contain has 
completed loading. But when there is no document, there is no load event.

How about:
- process output
- when ready
   - save output
   - send javascript which
     - notifies parent document
     - loads the saved file in the iframe


More information about the thelist mailing list