/    Sign up×
Community /Pin to ProfileBookmark

once more… works on IE but not on NN

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!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisNov 28.2002 — [i]Originally posted by tomas skersys [/i]

[B]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?

[/B]
[/QUOTE]


Hmmm ... I count two questions. ?

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.
×

Success!

Help @tomas_skersys spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...