I wrote a function which works in IE5, but not in netscape 4x - can anybody tell me why this is so? here's the code:
It's called by the following html:
Q: Why is my computer doing that?
A: Random Perversity of Inanimate
Objects
Code:
var currentLayer = "AboutUs";
function turnOn(newLayer) {
if (currentLayer != newLayer) {
var thisLayer = document.getElementById(newLayer);
thisLayer.style.visibility = "visible";
var oldLayer = document.getElementById(currentLayer);
oldLayer.style.visibility = "hidden";
currentLayer = newLayer;
}
}
It's called by the following html:
Code:
<a href="javascript:turnOn('AboutUs');">About Us</a>
<a href="javascript:turnOn('Contact');">Contacts</a>
Q: Why is my computer doing that?
A: Random Perversity of Inanimate
Objects