Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visibility in Netscape 6

Status
Not open for further replies.

Kaitana

Programmer
Apr 19, 2002
5
0
0
CA
The layer.layername.visibility='hide';

does not work in Netscape 6.

Is there another way to manage this?
 
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=&quot;position:absolute;left:10;top:10;&quot;>This is my div</div>

<script>
function hide(id)
{
if (document.layers)
{
document.layers[id].visibility = &quot;hide&quot;
}
else if (document.getElementById)
{
document.getElementById(id).style.visibility = &quot;hidden&quot;
}
else if (document.all)
{
document.all[id].style.visibility = &quot;hidden&quot;
}
}

hide(&quot;myDiv&quot;)
</script>

Hope this helps. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top