PDA

Click to See Complete Forum and Search --> : Hiding element


alex_read
Aug 15th, 2002, 03:49 AM
Hi all !
Can any web gurus out there tell me the netscape equivalent of these IE javascript functions to hide & show an element please?

function ShowMenuDiv(divID)
{
document.all.divMenu1.style.display = "";
}

function HideMenuDiv(divID)
{
document.all.divMenu1.style.display = "none";
}

punkpie_uk
Aug 15th, 2002, 08:59 AM
ns4 you mean?

try...

document.layers[layerid].visibility='hide';
document.layers[layerid].visibility='show';


With ns4 you cant turn the entire display off, only hide the element.

ns6 uses the w3c DOM.


document.getElementById(layerid).style.display='none';
document.getElementById(layerid).style.display='block';