Changing Attribute Values via Scripting
Despite the similarity of the Version 4 browsers’ support for defining positionable elements, the two browsers diverge widely in how you control attribute values from a script. The primary differences can be attributed to the way each browser implements its document object model. When these browser versions were released in 1997, the DOM standardization effort was only at the earliest stages in defining the requirements for such a standard. As a result, each browser company extended its object model from its previous version along clashing philosophical lines. The level of compatibility is fairly low, but the regular nature of both object models makes it possible to raise that compatibility level to embed sophisticated DHTML capabilities for both browsers in the same document.
Referencing Positionable Objects
In comparing the document object models of the two browsers, it is clear that Internet Explorer 4 went to extremes to make virtually every HTML element a scriptable object. Navigator 4, on the other hand, restricts access to element properties by making them read-only except when being set inside JavaScript-syntax style sheet rules. The first piece of the cross-browser positioning puzzle involves referring to the positionable elements in a document.
Navigator 4 references
For controlling
positionable element properties on the fly, Navigator uses its
layer object model to supply a wide range of methods and directly settable properties ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access