Apr 19, 2002 #1 Kaitana Programmer Apr 19, 2002 5 CA The layer.layername.visibility='hide'; does not work in Netscape 6. Is there another way to manage this?
The layer.layername.visibility='hide'; does not work in Netscape 6. Is there another way to manage this?
Apr 19, 2002 #2 xutopia Programmer Apr 4, 2002 2,001 CA yes you are attempting to do somehting that only netscape 4 understands. layers don't exist anymore in Netscape 6. Divs and elements however all have visibility attached to them. Here is how it would work in the major browser families : <div id=myDiv style="position:absolute;left:10;top:10;">This is my div</div> <script> function hide(id) { if (document.layers) { document.layers[id].visibility = "hide" } else if (document.getElementById) { document.getElementById(id).style.visibility = "hidden" } else if (document.all) { document.all[id].style.visibility = "hidden" } } hide("myDiv" </script> Hope this helps. Gary http://www.xutopia.com Haran Upvote 0 Downvote
yes you are attempting to do somehting that only netscape 4 understands. layers don't exist anymore in Netscape 6. Divs and elements however all have visibility attached to them. Here is how it would work in the major browser families : <div id=myDiv style="position:absolute;left:10;top:10;">This is my div</div> <script> function hide(id) { if (document.layers) { document.layers[id].visibility = "hide" } else if (document.getElementById) { document.getElementById(id).style.visibility = "hidden" } else if (document.all) { document.all[id].style.visibility = "hidden" } } hide("myDiv" </script> Hope this helps. Gary http://www.xutopia.com Haran