What is DHTML?
DHTML = Dynamic HTML
Ability to change style (visibility, appearance, position) and content of document in response to browser events.
DHTML components
1. The document
- The document contents, carefully marked up in valid HTML!
2. The style sheet
- The display rules for the document contents
- We'll use cascading style sheets.
3. The scripting language
- The tool for changing document contents and display styles.
- We'll use javascript.
- Components:
- Usual scripting language logic and flow-control stuff:
What to do.
- Document object model (DOM): the rules for identifying a chunk of the document contents.
Where to do it
- Event handlers: methods for detecting and acting on browser events.
When to do it
The complication
... of course!
- DHTML concepts have evolved quickly.
- DOMs used in common browsers are very different
- We'll spend some time looking how to write DHTML that works across browsers.