From: Nicola M. <nic...@ho...> - 2001-01-22 22:26:10
|
the problem is that unless we use a setTimeout in the createElement() for netscape 6 there is no way to get the getContentWidth() and Height() to work in ns 6 the problem with that tough is that if you have very complex widget ns 6 just will never finish creating 'em the problem is not with the DynAPI it's with the browser itself (damn it!) so the only fix I can think of is to to have a ns6SetSize() in the widget itself that will take care of the list size for ns 6 I haven't look at list,js so I'm just giving some idea not sure how it works u might wanna try to change this on ur setHTML it might help u too: DynLayer.prototype.setHTML=function(html) { this.html=(typeof html=='string')?html:'' //OLD: this.html=html?html:'' if (!this.created) return this.invokeEvent("beforeload") this.elm.innerHTML=this.html if (is.ns) html=(this.w==null)?'<NOBR>'+this.html+'</NOBR>':this.html if (is.ns4) { this.doc.open() this.doc.write(html) this.doc.close() for (i in this.doc.images) this.doc.images[i].lyrobj=this } else if (is.ns5) { while (this.elm.hasChildNodes()) this.elm.removeChild(this.elm.firstChild) var r=this.elm.ownerDocument.createRange() r.selectNodeContents(this.elm) r.collapse(true) var df=r.createContextualFragment(html) this.elm.appendChild(df) for (i in this.doc.images) this.doc.images[i].lyrobj=this.elm } else for (i in this.elm.all.tags("img")) {if(i=='length')this.elm.all.tags("img")[i].lyrobj=this} this.invokeEvent("load") } what this does it puts a <NOBR> tag around the html of a layer so that if u don't specified the size of the layer it makes it grow any way to the html size ciao Y _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com |