Welcome to week four of Cascading Style Sheets. Last week we began a descent into the depths of Dynamic HTML, a quasi-standard that lets scripting languages modify HTML content (which includes CSS) to make Web content dynamic. We started in on the architecture that defines the content of a browser window: the document object model.But we didn’t mention the relationship of XML to DHTML. You treat an XML tag like an HTML tag, although to be rendered the browser must support XML and the XML content must be declared (let us know if you’d like us to look at this topic).We concluded last week threatening to discuss document object model (DOM) standards, so here goes: In books and online you will find references to the Netscape Layer DOM, the Microsoft IE All DOM and the World Wide Web Consortium’s (W3C) ID DOM.These were all versions of DOMs that are now effectively obsolete unless you need to support older browsers. Today, the working DOM for browsers is the W3C’s DOM. Here’s the W3C DOM Working Group’s description of the specification: “This document contains the requirements for the DOM, a platform- and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure and style of documents. The DOM provides a standard set of objects for representing HTML and XML documents, a standard model of how these objects can be combined and a standard interface for accessing and manipulating them. Vendors can support the DOM as an interface to their proprietary data structures and APIs, and content authors can write to the standard DOM interfaces rather than product-specific APIs, thus increasing interoperability on the Web.”Dissecting DOMThe DOM specification contains several layers: Level 1 is the core for HTML and XML document models, with functionality for document navigation and manipulation. Level 2 includes a style sheet object model, defines functionality for manipulating style information attached to a document, enables traversal of the elements of a document, defines an event model and provides support for XML namespaces. Level 3 (which is not yet finished – see details) will specify document loading and saving; content models with document validation support; address document views; and formatting, key events and event groups. The DOM Level 1 and Level 2 specifications are final, so developers can implement them without fear of the specifications changing.Using the DOM you can create, read and modify elements in the structure of a document loaded in a browser window using a scripting language embedded in the document. We’ll consider JavaScript, although you could use other scripting languages such as VBScript and Perl.But if that is all there was to the DOM, there wouldn’t be much dynamism involved. Nope, the DOM also includes event handlers that are triggered when certain things happen to or in a document or an element in a document.There are many types of events, including object events (onLoad), element events (onFocus), and mouse events (onMouseOver, onMouseOut). See a complete list and an in-depth description; or get a simpler description of the events that apply to HTML 4.0. As a simple example, consider the following code that would be in the body of a document:The event handlers in this code reference the object document.images.strangedevice, which is the identity of the image tag the event handlers are embedded in. The image tag initially displays the contents of the file flagdown.jpg, but when the mouse is moved over the image the event onMouseOver is triggered, causing another image named flagup.jpg to load. When the event onMouseOut is triggered, the original image, flagdown.jpg, is reloaded. The image object could be referred to as images.strangedevice (the root object, document, is implicit), or just strangedevice because it is a unique ID in the document (although that could lead to errors).Next week, a more complex and generic version of the image rollover above.Your code to gearhead@gibbs.com. Related content news Cisco CCNA and AWS cloud networking rank among highest paying IT certifications Cloud expertise and security know-how remain critical in building today’s networks, and these skills pay top dollar, according to Skillsoft’s annual ranking of the most valuable IT certifications. Demand for talent continues to outweigh s By Denise Dubie Nov 30, 2023 7 mins Certifications Network Security Networking news Mainframe modernization gets a boost from Kyndryl, AWS collaboration Kyndryl and AWS have expanded their partnership to help enterprise customers simplify and accelerate their mainframe modernization initiatives. By Michael Cooney Nov 30, 2023 4 mins Mainframes Cloud Computing Data Center news AWS and Nvidia partner on Project Ceiba, a GPU-powered AI supercomputer The companies are extending their AI partnership, and one key initiative is a supercomputer that will be integrated with AWS services and used by Nvidia’s own R&D teams. By Andy Patrizio Nov 30, 2023 3 mins CPUs and Processors Generative AI Supercomputers news VMware stung by defections and layoffs after Broadcom close Layoffs and executive departures are expected after an acquisition, but there's also concern about VMware customer retention. By Andy Patrizio Nov 30, 2023 3 mins Virtualization Data Center Industry Podcasts Videos Resources Events NEWSLETTERS Newsletter Promo Module Test Description for newsletter promo module. Please enter a valid email address Subscribe