Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Microsoft: DOM, the Sequel

November 19, 1998

Historically speaking, Netscape was the first out of the gate with their Document Object Model, originally implemented for developers in Navigator 2, accompanying the birth of JavaScript 1.0. Microsoft essentially attempted to replicate Netscape's DOM for use in their Internet Explorer 3 browser, an add-on to Windows 95. Because Netscape did not publish specifications for their early DOM, and because Microsoft needed MSIE 3 to be compatible with Navigator, Microsoft was left to basically reverse engineer the Netscape DOM, somewhat like re-creating a building without the original blueprint in hand. The result, unfortunately, was less than stellar compatibility: Internet Explorer 3 possessed many bugs and incomplete implementations of various DOM components.

After receiving much negative energy from developers, Microsoft dug in their heels in preparing Internet Explorer 4 and re-approached their DOM with a new outlook. Whereas Netscape, gearing up to release Navigator 4, was planning several modest and a couple of significant additions to their DOM (most importantly, style sheets and layers, which are arguably one in the same), Microsoft went on the offensive. Rather than a tepid upgrade, the Internet Explorer 4 DOM was extremely ambitious, attempting to break down the anatomy of the page into many more, smaller, more manipulable components than the Netscape DOM attempted. Both companies touted their new DOM's as the bearers of "Dynamic HTML," but in reality Microsoft's implementation was far more "dynamic."

At the time of this writing, both Microsoft and Netscape are working towards the 5th generation of their browsers. It is still unclear what DOM each will finally implement, and/or if this will be the DOM recommended by the W3C in mid-October (see end of article). At this time, you'll be interested in working with Microsoft's Document Object Model supported in Internet Explorer 4.

In a nice nod to developers, Microsoft has published its DOM documentation in a very accessible format on the Web. Microsoft's SiteBuilder Network Workshop contains an cross-listed index of Document Object Model references. Unlike Netscape, Microsoft has kept their DOM reference distinct from their JavaScript (a.k.a. "JScript") reference material, the latter which can be found at the Microsoft Scripting Technologies site.

Returning to Microsoft's DOM reference, you will find several subheadings beneath the "DHTML References" topic: objects, properties, methods, and events should all ring familiar by now. The convenient structure of Microsoft's documentation allows you to cross-reference by navigating via each of these indexes -- thus, if you want to look up a property whose name you recall but whose owning object you do not, use the properties index. Once you click on a chosen property, the information sheet will report the objects to which it belongs.

Microsoft also indexes an additional topic which they call collections. A "collection," in Microsoft verbiage, is an array-based object. For example, the applet object contains properties and methods reflecting Java applets embedded into a page using the <applet> tag. However, the applet objects are contained within an array called applets[] , and so you refer to a specific applet object via its index in this array; e.g. applets[2]. Thus, the entry for the applets array is listed in Microsoft's "collections" index, while the entry for the applet itself resides in the "objects" index.

Surfing through the index of objects in Microsoft's DOM, you can quickly see that it supports many more than the Netscape DOM.

Microsoft Object Reference

Cleverly and conveniently, Microsoft has published their DOM so that it is easiest to reference while using MSIE 4. For instance, we'll look up the table object (an example, by the way, of an object which is not supported in the Netscape DOM). The reference sheets, seen below, contain quite a bit of information -- using the drop down menu you can switch between views of supported properties, methods, and events.

Properties of Table Object Methods of Table Object

Armed with the above documentation, the DOM's are at your fingertips. Despite the fact that the entries may appear long and intimidating, most objects are constructed along the same patterns. In practice, reading the DOM reference typically boils down to verifying what properties and methods do or do not belong to a particular object and, in some cases, how exactly they behave.

Netscape: The DOM
The Document Object Model Dissected
DOM of the Future


Up to => Home / Authoring / DHTML / DOM




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers