Is there a difference between document.tagID and document.all.tagID.
Yes, "all.".
Seriously, they are about equally wrong. Both work in IE. Neither work
in most other browsers (e.g., Mozilla/Netscape).
I've seen both like: document.myImage1.src = "nextImage2.jpg" and
document.all.hot1.style.color= ... where hot1 is in <span ID=hot1>.
Both exist. Neither should. For the first, use:
document.images['myImage1'].src = ...
or
document.images.myImage1.src = ...
or
document.getElementById("myImage1").src = ...
For the latter, use
document.getElementById("hot1").style.color = ...
All of these are specified in the W3C DOM.
Using the document.images collection is the safest method. It works
in all browsers since .. Netscape 3? 2? Since a long time ago.
The document.getElementById method requires a modern browser. The only
browsers that support document.all and not document.getElementById are
(as far as I know) IE 4 and WebTV. You can test for the existence of
getElementById first, and use it if it exists. If it doesn't exist,
check for document.all (IE4) or document.layers (Netscape 4) and use
what is available.
/L