[thelist] JavaScript chunk: Internet Explorer 5.5 versus Opera 6, Netscape Navigator 4.77
Mark Howells
mark at mountain.ch
Fri Mar 8 14:42:00 CST 2002
> I do not clearly know how NN 4.x deal JS. Therefore, I need some further
> explanation for following line:
> document.layers['rut'].document.layers[imgName].src='whatever';
> "layers" is confusing. Why am I supposed to use layers for NN 4.x?
document.layers is a reference in the Document Object Model that Netscape
applied a few years ago, which was intended for use as a reference to
objects in the page that were wrapped in <layer> tags. As these tags aren't
W3C standard tags, the use of <div> superseded them. The difficulty begins
when working with Netscape 4 as it is at least five years old and at the
time of it's release, <layer> was the perceived way forward for dynamic
layers.
So, in short;
- Netscape got it wrong a few years ago
- they now have a browser on the market which supports
document.getElementById (negating the need for document.layers)
- we have to code pages to work with a five year old DOM
- therefore, we have to use document.layers to cope with NN4
Did you follow that? I almost didn't. I'm going to turn my computer off now.
Regards
Mark Howells
<http://www.mark.ac/evl/>
More information about the thelist
mailing list