DHTML - Learning by Example
This book is aimed at becoming the standard text book for introductory courses on Dynamic HTML programming. It contains 26 examples of DHTML coding, with each followed by a detailed explanation. Theory, tips and new concepts are introduced "along the way", both in the body of the text as well as in the examples.
Experience shows quite clearly, that if you sit down at your PC and read/work through the book, you will be able to do most DHTML programming within a few days.
For this work you will ideally have a 4+ version Internet Explorer browser (MSIE4+) from Microsoft. This is available free from microsoft.com (http://www.microsoft.com). For Example D you will need a 5+ version Internet Explorer browser, however it can be displayed in Internet Explorer 4, if you add the XML parser (called "msxml"), which is available free from microsoft.com (http://msdn.microsoft.com/downloads/webtechnology/xml/msxml.asp). This is the only example where you will need an XML-enabled browser.
You will need a graphics program in order to make some simple GIF files. The Windows program MS-Paint, is sufficient. If you have others, like Adobe Photoshop in 4+ version, or Corel Draw, then you will not need their more advanced features.
An ASCII text editor is sufficient to write the code examples described in this book.
Symbols and Conventions
The Various HTMLs and XHTML
Cascading Style Sheets - CSS
Example A: Inline Style
Example B: Declared Style in the Style Element
Example C: Linked External Style Sheets
The Cascade in Cascading Style Sheets
Example D: Linked External CSS in XML
Example E: Absolute Positioning
Example F: Relative Positioning
Example G: Background Color and Background Graphics
Example H: Element Dimensions
Summary of CSS: Links
Summary of CSS: Selectors
Summary of CSS: Pseudo-classes
Further Reserved Words
Example J: Object Model and Collections
An Overview of Event Handlers:
Example K: Variables and Methods
Example L: Functions and Parameters
Example M: Conditional Statements and Loops
Example N: Conditional Statements, Operators and Standard Functions
Home Exercise 1: Forms and Arrays, a 24 hour On-Line Pizza Bar
Example O: Arrays
Example P: Environmental Variables and Browser Check
Example R: Data-Binding using Dynamic VBScript
Example S: DOM, Specifying the Background Color.
Example T: Dynamic Positioning
Positioning: Length Value Units
Home Exercise 2: Dynamic Graphics & Audio; Sniping at Layers
Example U: Dynamic Forms.
Example V: One Practical Use for RegExp.
Home Exercise 3: onFocus, onBlur and Regular Expressions
Example W: Drop-Down Menus
Example X: Movement using Timer Functions
Time-Related Properties of the Window Object
Example Y: Pre-Loading Mouse-Over Effects
Home Exercise 4: Pre-Loaded Images, an Art Gallery
Example Z: Timed Linked Graphical Sequence
Appendix A: Keyword Reference
Appendix B: Overview of Objects
Appendix C: Overview of Methods
Appendix D: Overview of Properties
Appendix E: Further Information on the Internet
Return to overview