ThePlace

Home ] Search ] Resources ] Site Map ] Contact Me ]
Dave's Information Technology Resource

Up ]

[ DHTML ] CSS ] JavaScript ] ActiveX and Plug-ins ] VBScript ] Web Applications ] ASP ] Web Databases ] ASP Applications ] Perl ] Java ]

--- DHTML ---

DHTML = Dynamic HTML

Technically, there is no such things as DHTML!

DHTML is the combination of technologies that enable developers to create interactive, client-based documents.  No one standard defines DHTML, rather a collection of standards (e.g., CSS) and technologies (e.g., JavaScript).

DHTML allows web developers to exercise direct, programmable access to the individual components of web documents, from individual elements (e.g., tags) to containers (forms, tables, documents).

DHTML access, combined with the event model, allows the browser to react to user input, execute scripts on the fly, and display the new content without downloading additional documents from a server.  The DHTML DOM puts sophisticated interactivity within easy reach of the average HTML author.

The Elements of DHTML

bulletHTML 4.0 including Cascading Style Sheets (CSS), and the Document Object Model (DOM). Creating dynamic HTML documents would not be possible without these two additions.
bulletCascading Style Sheets (CSS) - the style and layout model for HTML documents. Creating dynamic HTML documents would not be possible without CSS. 
bulletDocument Object Model - a document content model for HTML documents.
bulletJavaScript (and VBScript)

 

DOM (Document Object Model).  

bulletThe DOM is a hierarchy of relationships between objects in the browser environment.
bulletThe DOM is defined at... http://www.w3.org/DOM/ 
bulletThe DOM is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented page (from W3C).

What Does the DOM Do?

The DOM enables you to "program" the behavior and operation of a web document, specifically:

bulletChange the appearance, content, or behavior of HTML tags - typically by modifying the value of tag attributes.  For example, changing an image by changing the value of a src attribute in an image.
bulletStylesheets take advantage of the DOM by allowing tag attribute behavior to be defined by a variety of methods (inline, document level, and or external style sheets).
bulletBe able to respond to user triggered or generated events such as loading a web page, submitting a web form, clicking a button, pressing a key, or detecting mouse movements and then responding to these events.
bulletThe "glue" for the DOM is a script language environment: JavaScript in Netscape and Internet Explorer, and VBScript in Internet Explorer.
bulletScripting languages allow the developer to "program" web documents to respond to a variety of events.

There are significant differences in the physical layout of the DOM between Internet Explorer and Netscape.  The following shows the parent-child relationship of document objects (and the differences between Internet Explorer and Netscape Navigator):

The Internet Explorer DOM looks like this...

document

bulletall (by style, attribute)
bulletdocument elements (by name, style, attribute)
bulletanchor
bulletapplet
bulletbody
bulletframe
bulletimage
bulletlink
bulletlocation
bulletscript
bulletstyle sheet
bulletform
bulletform elements (by name, value)
The Netscape DOM looks like this...

document (layers)

bullettags (includes forms) (by tag, attribute)
bulletclasses (by tag, attribute)
bulletids (by attribute)
 

DOM Events

DOM events enable developers to create applications that include "triggers" based on user interaction or page operations.  User interaction includes clicking buttons or moving the mouse.  Page operations include loading the web page into the browser.

Typical events include:

bulletonmousemove - when a mouse is moved
bulletonmouseover - when the mouse is moved over an object
bulletonmouseout - when the mouse moves off an object
bulletonmousedown - when the mouse is clicked
bulletonmouseup - when the mouse is released
bulletonclick - when mouse button is clicked (e.g., a button is pressed)
bulletonchange - when data is entered (e.g., a text box is changed)
bulletonsubmit - when the submit button is pressed and the form is sent to a web server
bulletonreset - when the reset button is pressed
bulletonload - when the document is loaded into the browser
bulletonfocus - when the cursor is moved to a form element
bulletonblur - when focus is lost from a form element
bulletonkeypress - when a key is pressed (form element)
bulletonkeydown - when the key is pressed down (form element), prior to onkeypress
bulletonkeyup - on release of the key, follows onkeypress

Other Information Resources on DOM

bulletW3C DOM Specification: http://www.w3.org/DOM/ 
bulletIE/Document Object Model: http://msdn.microsoft.com/workshop/author/om/doc_object.asp 
bulletNetscape Document Object Model: http://developer.netscape.com/tech/dom/ 

 

 

Home ] Up ] Computer Architecture ] Programming Bootcamp ] Database Bootcamp ] Visual BasicS ] Web Basics ] Web Multimedia ] Advanced Web Topics ] Developing Web Sites ] XML Technology ] Web Glossary ]

Copyright © 1999 - 2005 
ThePlace - Written and Sponsored by Dave Hillman