Message from discussion FF, Iframe and load-event after a file-download
NNTP-Posting-Date: Tue, 07 Jul 2009 08:58:01 -0500
Date: Tue, 07 Jul 2009 15:58:00 +0200
From: Jakob Bohm <alkwtoposvugsiv...@jbohm.dk>
User-Agent: Icedove 126.96.36.199eol (X11/20090106)
Subject: Re: FF, Iframe and load-event after a file-download
Content-Type: text/plain; charset=UTF-8
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
> I have some problems, because its seems to be so, that FF is not fireing a "load" event after finischeing to load my iframe.
> Here is what I've done:
> - i've created a IFRAME,
> - added an event-listener "load" and
> The src-Url is been loaded as it should, but the "load" event is not been fired.
> The loaded file is not a HTML file, but a file-download.
I am no expert, but here is my guess: When new document is loaded into
a window, tab or frame, all the handlers for that window/tab/frame are
reset to those of the new document (because it makes sense and to
prevent XSS issues). Thus when your file is loaded into the IFRAME, the
load handler for that IFRAME is set to the load handler (possibly none)
specified in that file.
Thus to make your outer document react to completion of loading content
in your IFRAME, you will have to rely on something that does not belong
to the document in that IFRAME, OR put code in the file you are going to
Another option would be to load the document with XMLHTTPRequest.