| re: document.all vs. document.layers
yawnmoth wrote:
[color=blue]
> As I understand it, document.layers only works in Netscape 4+[/color]
No, it only works in Netscape 4.x. Netscape 6 onwards do not support it.
[color=blue]
> (ie. it doesn't work in any version of Internet Explorer), while
> document.all only works in Internet Explorer 4+ (ie. it doesn't work in
> any version of Netscape). Is that correct?[/color]
No. document.all is supported by quite a lot of things, but most browsers
claim that they don't when you test for it (on the principles of (a) if you
test for it then you are hopefully also testing for the standard DOM and
(b) many people test for it and then assume the browser is IE).
[color=blue]
> Also, what about document.getElementById?[/color]
This is the standard.
[color=blue]
> When did Internet Explorer start supporting that and when did Netscape
> start supporting that?[/color]
Versions 5 and 6 respectively IIRC.
There is more to the WWW then IE and NS though, Netscape is not a very
common browser these days. There is also Firefox, Opera, Konqueror, Safari,
and so on.
[color=blue]
> I ask because I'm wondering how necessary doing something similar to
> the following is[/color]
Depends on how far back you want to support. Personally I find that sticking
to the standard DOM is enough and older browsers can get the fallback code.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is |