c-- styles for logos and headline links do not modify internet, red, or black styles -->

Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

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

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!

The Document Object Model Dissected



By Aaron Weiss

Tutorial TOC

  1. Introduction
  2. Gray's Anatomy\ Master of Your DOM
  3. Use the DOM, Luke
  4. Netscape: The DOM
  5. Microsoft: DOM, the Sequel
  6. DOM of the Future


Netscape: The DOM

Despite the recent preview release of Netscape 6, with its support for W3C DOM Level 1 and partial Level 2 standards, we here will focus on the Netscape DOM that has resided within their version 4 browsers for the past couple of years. It will be some time until Netscape 6 proliferates, and although its new DOM poses exciting possibilities, the installed base of Netscape 4.x warrants our attention.

It is generally accurate to suggest that Netscape's Document Object Model "begins" at the window object; all other DOM objects being children of the window object. The notable exception to this is the navigator object, whose properties provide information about the browser version, and who 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 reference page from which it has been mirrored.

An overview of the Netscape 4.x 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. However, this resource integrates reference material on both JavaScript the language and the Document Object Model, often giving the impression that JavaScript and the DOM are one in the same. As far as the DOM is concerned, we are interested in the following chapters: "Document", "Window",
"Forms", "Navigator", and "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, if you if all this scattered documentation too fragmented to comprehend cohesively, a visit to your friendly book retailer should offer plenty of professionally-authored alternatives -- most such books will come under titles related to "Dyanmic HTML".

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 Form Object in 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 ObjectMore Anatomy of a Text Object

[print version of this page]

Of Interest
· An Introduction to DHTML

· Express Yourself