Forum Moderators: open
function showLayer(lyr)
{
if (document.all)
{
document.all[lyr].style.visibility = "visible";
} if (document.layers)
{
document.layers[lyr].visibility = "show";
}
}
function hideLayer(lyr)
{
if (document.all)
{
document.all[lyr].style.visibility = "hidden";
}
if (document.layers)
{
document.layers[lyr].visibility = "hide";
}
}
which works perfectly well in IE6.
but I'm trying to get it oging in mozilla/firebird/firefox and it just won't go? I can't understand... I must be using wrong functions or something.
Can someone please shed some light on this for me?
Cheers
here is the code if anyone else wants it.. I had difficulty finding a simple piece of code to do this.
function showLayer(lyr)
{
if (document.all)
{
document.all[lyr].style.visibility = "visible";
} if (document.layers)
{
document.layers[lyr].visibility = "show";
}
if (document.getElementById)
{
document.getElementById(lyr).style.visibility = "visible";
}
}
function hideLayer(lyr)
{
if (document.all)
{
document.all[lyr].style.visibility = "hidden";
}
if (document.layers)
{
document.layers[lyr].visibility = "hide";
}
if (document.getElementById)
{
document.getElementById(lyr).style.visibility = "hidden";
}
}