[thelist] show/hide layer issue (myownanswer)

Bruce Heerssen bruce at heerssen.com
Tue Oct 2 12:56:33 CDT 2001


Richard Bennett wrote:

> 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)

Well, perhaps, but I'm not a psychiatrist :) In my opinion, *everybody* 
is a little crazy, it's the human condition.

If I remember correctly, NN 4.x does in fact honor "visibility = 
'[hidden/visible]';". At least, that's what I've used, and it's safe 
when restricted to only NN4.x. Sure, it's not standards compliant, but 
neither is that browser.

-Bruce







More information about the thelist mailing list