Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Rollovers in Netscape 4.x

Status
Not open for further replies.

caffeinerusher

Programmer
Mar 7, 2001
31
US
I am coding a navigation bar that needs to have simple rollovers. Each link is contained in a table cell. The navigation needs to be text only--no graphics. What is the best workaround for changing text colors onMouseOver in Netscape. Thanks!
 
You have to make the contents a layer and rewrite the content of the layer onmouseover. For instance --

<td>
<layer id=&quot;myLayer&quot; onmouseover=&quot;changeMe('red')&quot;>
<span style=&quot;color:blue&quot;>stuff</span>
</layer>

--------

function changeMe(color){
document.layers[&quot;myLayer&quot;].open();
document.layers[&quot;myLayer&quot;].document.write(&quot;<span style='color:&quot; + color + &quot;;'>stuff</span>&quot;);
document.layers[&quot;myLaer&quot;].close();
}

That should work! ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
This is for images, but easaly turned into text if u want to.
With the above code for NS4.x u should make a nice script ;-)

function turnOn(imageName) {
if(document.all) { // IE & Opera
document.all[imageName].style.visibility = &quot;visible&quot;;
} else if(document.getElementById) { // NS6, NS6.1 en Mozilla 0.8 en 0.9
document.getElementById(imageName).style.visibility = &quot;visible&quot;;
}
}

// Laat driehoek verdwijnen voor menuitems
function turnOff(imageName) {
if (document.all) { // IE & Opera
document.all[imageName].style.visibility = &quot;hidden&quot;;
} else if(document.getElementById) { // NS6, NS6.1 en Mozilla 0.8 en 0.9
document.getElementById(imageName).style.visibility = &quot;hidden&quot;;
}
} mcvdmvs
mick@nederland.net

knows: html, JavaScript, dhtml, css, php, mysql, postgresql, xml, linux
to learn: java, c++, perl, python
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top