magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1997 > 11 > HTML Coder  

Collections in Dynamic HTML

HTML Coder

By Rob Falla

Dynamic HTML (DHTML) is a rather cool technology that allows you to change the appearance of an HTML document on the fly and to create dynamic content, such as animated text, on a single page. Rather than loading a series of HTML pages to create dynamic content, DHTML lets you define objects on a single page that can change over time. You can then manipulate these objects via collections.

In this article, I'll take a brief look at the DHTML event-handling and object model, show how you can do simple things like alter font colors, and then explore collections. Note that although DHTML is based on the World Wide Web Consortium's Cascading Style Sheets standard, the two major browser manufacturers support DHTML differently. I'll focus on Microsoft's implementation here.

Handling Events

DHTML works by placing an event handler in the start tag of an HTML element, or tag. Events such as onMouseOver, onMouseOut, and onClick are fired by either a user action or a timer event. The browser calls the function associated with the event handler and tells it to execute. When the script contained within the function runs, it can change the currently displayed elements: text size and color, background, tag contents, and so on. The browser repositions other elements to make the altered element fit while repainting the appropriate section of the document. Only changed or moved elements are repainted.

The event handler has an attribute value that provides the name of the function.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2