1 reply [Last post]
anubhatia
Offline
newbie
nj
Last seen: 15 years 29 weeks ago
nj
Joined: 2007-05-08
Posts: 1
Points: 0

Having problem with this code:

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");

if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";

------------------------------------------------------

I get error while setting the visibility to hidden, it says "whichDog.style" us "undefined"

Using alerts i found out that "whichDog" object gets set but "whichDog.style" does not.

Can someone help me in getting whichDog.style object set.

Thanks,

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Er this is really a forum

Er this is really a forum for css matters rather than Javascript, could these sorts of threads at least be placed in 'Off Topic' where I'll move it if that's alright.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me