B4 DOM Script

This script is designed to give the 4.0 browsers some of the DOM syntax.
In Netscape 4,this would be limited to positioned elements (aka Layers).
The syntax should work in DOM compliant browsers as well as in IE 4 and Opera 5.
Please drop me a line if you can prove me wrong.

The elements are retrieved with the document's getElementById method,
and the properties accessed through the element's style object.
The getElementsByTagName method for the document is also available.
Netscape 4 will return all positioned elements regardless of the argument used.
Also,the method needs to be called after the page is loaded to be useable.

In Netscape 4,the only unit that can be used is pixel (px) and the
accessible properties are limited to the following:
height,width,left,top,visibility,zIndex,clip,backgroundColor and backgroundImage

Height() and Width() methods are added to the window which return the viewing area

To use the script the following line should be put in the head of the webpage.
Right-click the link and save the file to the same directory as the webpage.

<script language="Javascript1.2" src="b4dom.js"> </script>

Put the script to the test

This is a positioned DIV named "layer1"









Main Page