Hey there,
I have seen in many books and on several tutorial websites the practice of using a variable to save typing e.g.
var d = document.all.mylayer;
then later to use the whole dot'd notation simply putting;-
d.visibility = "hide";
A great idea but after using javascript on and off for a year now, I can still say this has NEVER worked for me.
I'm sure there must be something i am missing, but whenever i try to get it right i get a message saying that my shortcut var (in this case d) is null or undefined.
Usually I try for a while and then just type it all long-hand.
Anyone who can tell me what exactly i need to do to get this working will really help me out, not to mention save my typing.
Many thanks
Jez

I have seen in many books and on several tutorial websites the practice of using a variable to save typing e.g.
var d = document.all.mylayer;
then later to use the whole dot'd notation simply putting;-
d.visibility = "hide";
A great idea but after using javascript on and off for a year now, I can still say this has NEVER worked for me.
I'm sure there must be something i am missing, but whenever i try to get it right i get a message saying that my shortcut var (in this case d) is null or undefined.
Usually I try for a while and then just type it all long-hand.
Anyone who can tell me what exactly i need to do to get this working will really help me out, not to mention save my typing.
Many thanks
Jez
