From: <cam...@ya...> - 2001-01-18 11:33:20
|
I've attached an updated loadpanel with Netscape 6 support. I've got the Autoresize working. There are still some issues though. For one, css styles are not being applied to whatever's being loaded into LoadPanel. I have no idea why not. Images aren't always being loaded, this is also a problem with IE. Apart from the NS6 modifications, I've added a 'false' parameter to all setHTML calls, as I believe LoadPanel should not invoke load events unless something is actually loaded. I've also got some suggested updates for dynlayer.js. The first is to setHTML, I've added the noevent check to the beforeload event invocation. Also, I've moved this.elm.innerHTML into the else block because this was setting the HTML twice in NS6, and I don't think NS4 needs innerHTML to be set? 423,424c423 < this.invokeEvent("beforeload"); < this.elm.innerHTML=html; --- > if (noevt!=false) this.invokeEvent("beforeload"); 441c440,441 < else { --- > else { > this.elm.innerHTML=html; I've changed getContentWidth and getContentHeight to support NS6, although I haven't really tested this bit properly so I'm not sure that it works: 485c485,489 < return this.elm==null? 0 : (is.ns4? this.doc.width : parseInt(this.elm.scrollWidth)); --- > if (this.elm==null) return 0; > else if (is.ns4) return this.doc.width; > else if (is.ns5) return this.elm.offsetWidth; > else return parseInt(this.elm.scrollWidth); > // return this.elm==null? 0 : (is.ns4? this.doc.width : parseInt(this.elm.scrollWidth)); 488c492,496 < return this.elm==null? 0 : (is.ns4? this.doc.height : parseInt(this.elm.scrollHeight)); --- > if (this.elm==null) return 0; > else if (is.ns4) return this.doc.height; > else if (is.ns5) return this.elm.offsetHeight; > else return parseInt(this.elm.scrollHeight); > // return this.elm==null? 0 : (is.ns4? this.doc.height : parseInt(this.elm.scrollHeight)); If there aren't any problems with these changes, I'd like to add the NS6 enabled LoadPanel to CVS, and the changes to setHTML. Cheers Cameron. __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |