PDA

View Full Version : Change layer from hidden to visible



Dalziel
12-03-2003, 01:31 PM
How do you change a layer's property from hidden to visible dynamically with JS?

Dalziel
12-03-2003, 02:36 PM
I can't get it to work outside IE :mad:

liorean
12-03-2003, 05: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.