Re: javascript issue with NN 6.2

by Kathy Wheeler <kathyw(at)home.albury.net.au>

 Date:  Tue, 27 Nov 2001 10:58:47 +1100
 To:  "Kim G" <kgws(at)kgwebsolutions.com>,
"hwg techniques" <hwg-techniques(at)hwg.org>
 References:  o9f7y5
  todo: View Thread, Original
Add a case for
if(document.getElementById) + whatever other tests you need, refering to your 
objetcs by their document.getElementById identifier, and for show(object) 
it's 
document.getElementById(yourElementIdName).style.visibility = "visible";
conversely for hide:
document.getElementById(yourElementIdName).style.visibility = "hidden";

getElementById will work for both IE5+ and NN6/mozilla.
.layers for NN3.x & 4.x
.all for IE4.x and some IE5's on Mac ...

Cheers,
KathyW.

> <.script language="javascript" type="text/javascript"><!--
> function show(object) {
>     if (document.layers && document.layers[object] != null)
>         document.layers[object].visibility = 'visible';
>     else if (document.all)
>         document.all[object].style.visibility = 'visible';
> }
> function hide(object) {
>     if (document.layers && document.layers[object] != null)
>         document.layers[object].visibility = 'hidden';
>     else if (document.all)
>         document.all[object].style.visibility = 'hidden';
> }
> //--><./script>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA