Hi all,
I am a newbie to javascript. Please help me with this....
I have problem accessing subelement tag content from parent tag in
javascript. I would like to change the color of text from red to blue.
In the following code, I am able to set the visibility but not the
color. Please make any suggestions.
<HEAD>
<script language="JavaScript">
function setColor(id) {
if (document.all) { // IE 4+
document.all[id].style.visibility="visible";
document.all[id].nobr.a.style.color = "blue";
}
</script>
</HEAD>
<BODY>
<div class="TEST" id="menu1" style="top: 50px" title="Test">
<nobr><a style="color: 'red'" onClick="setColor('menu1');" href="#"
target="content">test</a></nobr>
</div>
</BODY>
Thanks
PG