NEVER!! NEVER EVER EVER sould you 'just put it into cvs' All patches and modifications should be tested and varified with and by the DynAPI community. As for you patch, did you actually test it? Did you call setHTML on a layer in NS that had a <img> tag inserted?
I can tell you right now that you image would dissapear rather permanently. It's a nice idea tho. You may want to concider making an extension instead..\ call is NTBgImage.js or something.. You'll have to over-write a lot of stuff, souch as setBgImage, setHTML, onclick,onmouseover, ect. The reason being, that you'll actually want two layers: One hold's the image and the other layer the other layer will be written to with setHTML and will response to mouse events.. ----- Original Message ----- From: "Matt Fair" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 10, 2001 12:51 PM Subject: [Dynapi-Dev] dynlayer.js bgImage bgImageRepeat > Do we have to still use the <layer> tags? I have been researching how > to set the background image of the layer and either have it repeat or > not. I don't think there is a way to set it in the <layer> tag wether > the background image is repeating or not, it is just by default > repeating. So I am thinking of this: > -have a variable this.bgImageRepeat=false by default > -for getOuterHTML() : > if (is.def) { > DynLayer.prototype.getOuterHTML=function() { > ... > if (this.bgImage!=null) { > s+=' background-image:url('+this.bgImage+');'; > if (this.bgImageRepeat) s+=' background-repeat:repeat;'; > else s+=' background-repeat:no-repeat;'; > } > ... > }; > }else if (is.ns4) { > DynLayer.prototype.getOuterHTML=function() { > var s='\n<layer id="'+this.id+'"'; > ... > > if (this.bgImage!=null && this.bgImageRepeat) > s+=' background="'+this.bgImage+'"'; > > ... > s+='>'; > if(this.bgImage!=null && !this.bgImageRepeat) > s+='<img src="'+this.bgImage+'">'; > if (this.html!=null) s+=this.html; > for (var i=0; i<this.children.length; i++) > s+=this.children[i].getOuterHTML(); > s+='</layer>'; > return s; > }; > }; > > > What does anyone think? > Should I just make the changes, test them, and put them right into the > cvs? > > Matt > > > _______________________________________________ > Dynapi-Dev mailing list > [EMAIL PROTECTED] > http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/ > _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/