[thelist] show/hide layer issue (myownanswer)

Peter-Paul Koch gassinaumasis at hotmail.com
Wed Oct 3 05:11:28 CDT 2001


>Hi, I was wondering though, although your show() and hide() methods are set
>up to be cross-browser, it looks like there's an error in the NS4 section.
>what you have:
>
>   else if (document.layers && document.layers[object]) {
>     document.layers[object].visibility = 'visible';
>   }
>
>That should be :
>   else if (document.layers && document.layers[object]) {
>     document.layers[object].visibility = 'show';
>   }
>
>And in hide() 'hidden' should be 'hide'.
>
>or I am I going crazy :o)

When *reading out* the visibility you get show or hide. To *set* the 
visibility you may use either show/hide or visible/hidden. Strange Netscape 
4...

Not sure what the problem is, as long as object contains a valid layer name 
and the layer has 'position: absolute', it should work.

ppk

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





More information about the thelist mailing list