hide/show layers

They have: 56 posts

Joined: Feb 2000

what is the javascript to hide/show layers? don't give me the dreamweaver code. i don't want that one. i'm assuming it's something like document.LAYER_NAME.visibility=hidden and document.LAYER_NAME.visibility=visible but thats not working for me. by the way. it needs to be cross browser if possible

The trouble with doing something right the first time is that nobody appreciates how difficult it was.

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Rageforth,

document.layers.divid.visibility = 'hidden'; is not Dreamweaver code -- it is javascript code (for Netscape's layers)
the equivalent for IE is:
document.all.divid.style.visibility='hidden';

if you want to learn dHTML, see the "dHTML: an Introduction" script at my site. It not only demonstrates crossBrowser layers (with s) but also explains it.

Vinny

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.