View Full Version : Change layer from hidden to visible

Dec 3rd, 2003, 02:31 PM
How do you change a layer's property from hidden to visible dynamically with JS?

Dec 3rd, 2003, 03:36 PM
I can't get it to work outside IE :mad:

Dec 3rd, 2003, 06:37 PM
By using the corect ways of referencing an element. In other words, you shouldn't use
document.all['elementname'].style.visibility = 'visible';
// nor should you use
elementname.style.visibility = 'visible';This because those both are iew proprietary. The correct way of referencing an element would be
document.getElementById('elementname').style.visibility = 'visible';That will work in all g5 browsers.