From: Pascal <pb...@oi...> - 2001-01-04 07:25:57
|
but why not just listen for the onload event which is being triggered at the end of the loading (when it's finished :) Pascal Bestebroer (pb...@oi...) Software ontwikkelaar Oberon Informatiesystemen b.v. http://www.oibv.com > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Mark Haviland > Verzonden: donderdag 4 januari 2001 0:38 > Aan: dyn...@li... > Onderwerp: RE: [Dynapi-Dev] loadpanel troubles... > > > > > > -----Original Message----- > > From: dyn...@li... > > [mailto:dyn...@li...]On Behalf Of Robert > > Rainwater > > Sent: Sunday, December 31, 2000 11:46 PM > > To: dyn...@li... > > Subject: Re: [Dynapi-Dev] loadpanel troubles... > > > > > > > > > > > I think in LoadQueue.prototype.loadNext, you can change: > > > > > > this.index++; > > > > > > -to- > > > > > > DynAPI.removeFromArray(this.queue,this.index++); > > > > > > > > oops. It should probaly say: > > > > DynAPI.removeFromArray(this.queue,this.index); > > Score! Thanks. > > Is there any way that the following can make it into CVS for > loadpanel ? > > In the constructor: > > this.loadHandlerOnFinish = null; > > then the loadHandler method would become: > > LoadPanel.prototype.loadHandler = function(url) { > this.url = url; > var w,h; > if (is.ns4 && this.isILayer) { > w = this.loadElement.document.width; > h = this.loadElement.document.height; > } > else { > w = this.getContentWidth(); > h = this.getContentHeight(); > } > if (this.autoW) this.setWidth(w,false); > if (this.autoH) this.setHeight(h,false); > this.isReloading = false; > this.invokeEvent('load'); > if (this.loadHandlerOnFinish != null && > typeof(this.loadHandlerOnFinish) == "function"){ > this.loadHandlerOnFinish(w,h); > } > }; > if (this.loadHandlerOnFinish != null && > typeof(this.loadHandlerOnFinish) == "function") { > this.loadHandlerOnFinish(w,h); > } > > I'm creating a widget where I keep an array of loadpanels for > URL's that have been added to my widget object. Adding the > above code the the loadpanel class was the only way I could > figure out how to 'safely' get the width & height of a panel. > > > -Mark Haviland > )Ú¦ Þ¾f¢)à+-)Ú¦ > Þ¾X¬¶Ë(º·~àzwÛiÿùb²Û,¢êÜyú+éÞ·ùYùb²Ø§~ÝÊv©×¯ > |