L
Lasse Reichstein Nielsen
Randy Webb said:But, getElementsByName and getElementById are not "DOM based
addressing", they are part of the language itself.
What language? They are defined by the W3C DOM, but are not part of
the ECMAScript standard.
So are
document.anchors
document.applets
document.forms
document.images
document.links
Resist the urge to use the gEBI syntax when the browser already has a
collections for it. Meaning, don't fall for the "use gEBI unless I
can't" mentality. It will go a long way in your future to keep you out
of that mistake.
I'd say: Use collections when they are part of the DOM standard, and
fall back on (testing for) document.gEBI, document.all, etc otherwise
(in that order).
/L