whichDog.style "undefined" problem
Here's my code:
whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");
if (isIE||isNN) whichDog.style.visibility="hidden";
else if (isN4) document.theLayer.visibility="hide";
setting style to hidden gives whichDog.style is "undefined" error. Using alerts i found out that whichDog object is getting set but whichDog.style object is not getting set.
How can i set whichDog.style object?