Click to See Complete Forum and Search --> : once more... works on IE but not on NN


tomas skersys
11-28-2002, 02:11 PM
one more question:
i have few simple functions that help to change the text color when moved over the image

function mover(objid)
{eval(objid).style.color="#CCCCCC";
eval(objid).style.backgroundColor="#727070";
}

function mout(objid)
{eval(objid).style.color="";
eval(objid).style.backgroundColor="";

----- here goes image and text code parts------------

<p class="PIRMO_L"><a id="tagas1" href="1.htm")ENCIKLOPEDIJA</a></p>

<td height="97" width="92" valign="bottom"><a href="1.htm" onMouseOut="mout('tagas1')" onMouseOver="mover('tagas1')"><img name="enciklo" border="0" src="enciklopedija_p.gif" width="82" height="83"></a></td>

------------------------------------------------------------

The whole code works fine on IE, but:
1) NN 4.x versions do not support style.color. Any1 knows what could replace it, so i could use the code on both IE and NN?
2) IE 6 supports style.color, but i have another problem in here - browser tells me that 'tagas1' is not defined. Any ideas, why?

thank you very much!

gil davis
11-28-2002, 05:09 PM
Originally posted by tomas skersys
one more question:
...
1) NN 4.x versions do not support style.color. Any1 knows what could replace it, so i could use the code on both IE and NN?
2) IE 6 supports style.color, but i have another problem in here - browser tells me that 'tagas1' is not defined. Any ideas, why?


Hmmm ... I count two questions. :D

Nevertheless, NN 4.x does not support style.anything. You can code color as a style or a font tag, but you cannot change the color of existing text. The only workaround would be the old document.write() to a layer trick (not much fun) or overlapping layers - one in one color and one in the other color - and change visibility (ewww! what's that smell?).

Dave's post pretty much covers the rest.