Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion FF, Iframe and load-event after a file-download

Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.mozilla.org!news.mozilla.org.POSTED!not-for-mail
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 1.5.0.14eol (X11/20090106)
MIME-Version: 1.0
Newsgroups: mozilla.dev.ajax
Subject: Re: FF, Iframe and load-event after a file-download
References: <mailman.2599.1246458940.5555.dev-ajax@lists.mozilla.org>
In-Reply-To: <mailman.2599.1246458940.5555.dev-ajax@lists.mozilla.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Message-ID: <e6udnZliHoD0yc7XnZ2dnUVZ_tednZ2d@mozilla.org>
Lines: 26
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 77.215.46.17
X-AuthenticatedUsername: NoAuthUser
X-Trace: sv3-OccRjepb9zIDCAsma81PVfamgieBdHJrVSdyQIDy4xpQYPwcbHtD5ccB2EoU3fiJcB0fYRAue2nlj7k!iPijm6qIooUmZ/G+Lt/14yWFC/wnu7oEdpJti+TyJURuyjk7xcCN2Yev9Js/Q3vFxL9+vuyryUnT!RlYoOltLyu0=
X-Complaints-To: abuse@mozilla.org
X-DMCA-Complaints-To: ab...@mozilla.org
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
X-Postfilter: 1.3.39
X-Original-Bytes: 2438

karfunckel-mozi...@yahoo.de wrote:
> Hi, 
> 
> 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 
> - set the src attribute with javascript. 
> 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
load.

Another option would be to load the document with XMLHTTPRequest.