[Javascript] How can I dynamically apply a CSS class to a layer tag NN4.61

denzil.pereira at dotexplaza.com denzil.pereira at dotexplaza.com
Tue Jul 24 07:36:52 CDT 2001


Hi,

I need to apply a CSS class to a layer tag in Netscape 4.61. Somehow inspite
of a lot of tries I could not get to do it.
Wud be grateful if any of you could tell me as to how do I get the same.

I tried the following :
<LAYER id="mylayer1" BGCOLOR="yellow" TOP=14 LEFT=165 WIDTH=25 HEIGHT=10
class="FontRed">
	&nbsp done
</LAYER>

document.mylayer1.style="FontRed"; //did not work
document.mylayer1.className="FontRed"; //did not work
document.mylayer1.style.color="Red"; //did not work


Another issue I am having is that when I dynamically change the contents on
my page using layer tags, the controls (like a checkbox) disappears from the
page and if I remove the layer tag it gets back on the page.

Please advice !!!

Thanx in advance for all your help. Have a nice day.

Regards,
Denzil



More information about the Javascript mailing list