Howdy folks,
I’m new to dhtml and would greatly appreciate any advice on coding for browser compatibility. I am running a page that uses divs, css & js to show and hide layers. It works fine in ie6 but not at all in ns7
Here’s the js code:
<!–
var isNav, isIE
if (parseInt(navigator.appVersion) >= 4)
{
if (navigator.appName == “Netscape”)
{
isNav = true
}
else
{
isIE = true
}
}
// Show & Hide layers
// Showlayer function
function showLayer(layerName)
{
if (isNav)
{
document.layers[layerName].visibility = ‘visible’
}
else
{
document.all[layerName].style.visibility = ‘visible’
}
}
// Hidelayer function
function hideLayer(layerName)
{
if (isNav)
{
document.layers[layerName].visibility = ‘hidden’
}
else
{
document.all[layerName].style.visibility = ‘hidden’
}
}
//–>
Can anyone tell me why this doesn’t work in netscape?
Thanxalot
TonyC