From: Cameron H. <ca...@bi...> - 2001-01-22 15:49:57
|
make sure you have to right one, i posted two to the list. the first didn't do autoresize, but the second does (kind of). it's a work in progress and isn't quite perfect yet. at the moment, what ns6 does is load the content into a hidden iframe, and then gets the html and set's the innerHTML of the loadpanel to the new HTML. If I try and get the size of the loadpanel after I've set the HTML, I can only get the size of the visible loadpanel, not the full size of the content. What I've done to get around this is get the size of the IFRAME before I destroy it. This kind of works, but it's not the real content size only an estimate. I don't actually know how to get the correct content height/width of a layer in NS6. Does anyone else out there know? Cameron. > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of francesco > AGATI > Sent: 22 January 2001 15:34 > To: dyn...@li... > Subject: Re: [Dynapi-Dev] ns6 loadpanel update and dynlayer > suggestions... > > > on netscape 6 the resize of loadpanel do not function > > > franesco > > ----- Original Message ----- > From: "Cameron Hart" <cam...@ya...> > To: <dyn...@li...> > Sent: Thursday, January 18, 2001 12:33 PM > Subject: [Dynapi-Dev] ns6 loadpanel update and dynlayer suggestions... > > > > 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/ > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev |