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


Netscape: The DOM

November 19, 1998

Unfortunately, we necessarily begin with a confusing caveat: despite the fact that the DOM as a construct is distinct from JavaScript the language, Netscape's documentation integrates its reference material on the DOM into its JavaScript Reference materials. This can lead to some confusion. Some objects contained in the Netscape documentation, such as the string object, belong to JavaScript, the programming language. Other objects, such as the window object, are actually part of the DOM, accessed via JavaScript. As long as JavaScript and the DOM are intertwined this distinction may seem esoteric, but it is an important reminder that the DOM and the JavaScript language are actually born from two separate specifications.

With regards to Netscape, it is generally accurate to suggest that the DOM "begins" at the window object; all objects which are children of the window object are also part of the DOM. The notable exception to this is the navigator object, whose properties provide information about the browser version, which is a peer object of window rather than a child. Netscape provides a reasonable graphical overview of their DOM found in the image below. This image links to the Netscape page from which it has been mirrored.

An overview of the Netscape Document Object Model.

Netscape DOM


Netscape does not publish a single DOM-specific reference document; rather, we must currently work with two documents to learn the Netscape DOM. First and foremost, Netscape's JavaScript Reference contains detailed information on most DOM objects and their properties, methods, and events. As stated previously, this resource integrates reference material on both JavaScript the language and the Document Object Model. As far as the DOM is concerned, we are interested in the following chapters: Chapter 5 - "Document", Chapter 6 - "Window", Chapter 7 - "Forms", Chapter 8 - "Browser", and Chapter 9 - "Events and Event Handlers".

Unfortunately, Netscape has chosen to dedicate an entirely separate document - "Dynamic HTML in Netscape Communicator" - to coverage of DOM objects which support layers and style sheets, which we should also consider part of the DOM reference. Specifically, we're interested in Chapter 5 - "Style Sheet Reference: New JavaScript Object Properties" and Chapter 9 - "Using JavaScript with Positioned Content".

Of course, there are books on the market which consolidate this information into an easier-to-read format; however, these books necessarily trade-off timeliness for friendliness -- changes to the DOM may quickly render parts of such a book obsolete, until the next edition.

Once you know where to look for DOM reference half the battle is won. Reading the DOM itself is not terribly difficult, assuming you already understand the meanings of objects, properties, methods, and events, and understand how to use them with a programming language such as JavaScript. Perhaps, for example, you remember that the Netscape DOM provides a text object which reflects a single-line text input form field. However, you don't exactly know what properties or method this object supports. So, we open a browser to the aforementioned Chapter 7 of Netscape's JavaScript Reference, which presents us with a table of supported form-related objects:

Chapter 7 - Form Objects

Near the bottom of this table you can (faintly) see the text object. Click that link and you'll be presented with (9 pages of ) full-on anatomy of the text object, including illustrations and example code. Jackpot.

Anatomy of a Text Object More Anatomy of a Text Object

Use the DOM, Luke
The Document Object Model Dissected
Microsoft: DOM, the Sequel


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, Reprints, & Permissions, Privacy Policy.

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