document.all vs. document.layers



As I understand it, document.layers only works in Netscape 4+ (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?

Also, what about document.getElementById? When did Internet Explorer
start supporting that and when did Netscape start supporting that?

I ask because I'm wondering how necessary doing something similar to
the following is:

if(document.getElementById)
obj = document.getElementById(id);
else if(document.all)
obj = document.all[id];
else if(document.layers)
obj = document.layers[id];
else
return 1;

.



Relevant Pages

  • browser preference
    ... "Internet explorer cannot find the ... >"Internet Explorer and Netscape Navigator both want your ... >take over for the other as the default browser each time ... >default browser is the one that automatically opens when ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Windows Defender (formerly windows antispyware) is out!
    ... Sure you will be able to buy Windows Vista and get WD, but WD will still be available as a stand alone product for free. ... You know, as soon as they run Netscape and other browsers out of business, they'll start charging for it. ... If you've been around as long as I have, you'll know that Netscape started as a free browser competing against my favorite mosaic browsers. ... With the launch of Windows 1995 and a web browser of its own (Internet Explorer) in August 1995, ...
    (microsoft.public.windowsxp.general)
  • Re: Freedom of choice is guaranteed by US Constitution!
    ... It does reference some pictures, but none are on the page. ... download the Internet Explorer just like for me Netscape. ... Netscape Navigator, and if the Netscape could be seen by Internet ... accordion this is fine too. ...
    (rec.music.makers.squeezebox)
  • Re: Windows Defender (formerly windows antispyware) is out!
    ... Sure you will be able to buy Windows Vista and get WD, ... as soon as they run Netscape and other browsers out ... Netscape started as a free browser competing against my favorite mosaic ... (Internet Explorer) ...
    (microsoft.public.windowsxp.general)
  • Freedom of choice is guaranteed by US Constitution!
    ... Freedom of choice is guaranteed by US Constitution! ... It does reference some pictures, but none are on the page. ... download the Internet Explorer just like for me Netscape. ... Netscape Navigator, and if the Netscape could be seen by Internet ...
    (rec.music.makers.squeezebox)