Sams Teach Yourself
DHTML in 24 Hours provides a friendly,
accessible way to learn
DHTML. Beginning with the
basic
concepts, it will proceed with concise lessons on the DOM
and style sheets. Later lessons will present real-world
examples of useful DHTML applications, such as cascading
menus, and continue with advanced techniques, such as
animation and
dynamic fonts.
After finishing this book, readers will be able to add
advanced, interactive features to their Web pages, while
adhering to standards and ensuring that older and alternate
browsers will still be supported.
Contents
Introduction.
I. GETTING STARTED.
Hour 1. Understanding DHTML.
What Is Dynamic
HTML? The
Components of DHTML. History of DHTML and the DOM. DHTML
Browsers.
Hour 2. Reviewing HTML.
Basic HTML Syntax.
Defining Parts of a Document. Styling Text.
Creating Forms.
Workshop: Creating a Web Page with HTML.
Hour 3. Understanding
JavaScript.
JavaScript Basics.
Understanding Variables. Using Conditions and Loops. Using
Functions. Understanding Objects. Workshop: Adding a Script
to a Web Page.
Hour 4. Creating a Simple DHTML Example.
Starting with an HTML
Document. Finding Objects. Creating the Script. Workshop:
Putting It All Together.
II. LEARNING DHTML BASICS.
Hour 5. Understanding the DOM.
Learning DOM Structure.
Using DOM Objects.
JavaScript and the DOM. Workshop: Hiding
and Showing Objects.
Hour 6. Creating Positionable Elements (Layers).
Why Layers? HTML Tags for
Layers. Positioning Objects. Creating a Layered Document.
Workshop: Manipulating Layers with JavaScript.
Hour 7. Working with DOM Properties and Methods.
Understanding Node
Properties. UsingDocument Methods and Properties. Using
Node Methods. Workshop: Adding and Removing Text on a
Page.
Hour 8. Responding to Events.
Understanding Event
Handlers. Using the event Object. Dynamic Event Handlers.
Using Mouse Events. Using Keyboard Events. The onLoad
Event. Form Events. Workshop: Displaying an Event
Log.
III. WORKING WITH STYLE SHEETS.
Hour 9. Introducing Style Sheets.
Why Style Sheets?
Integrating Style Sheets with HTML. Basic Style Properties.
Workshop: Creating a Simple Style Sheet.
Hour 10. Using Style Sheet Properties.
Creating Styled Text.
Working with Fonts. Setting Margins and Borders. Setting
Other Style Attributes. Workshop: Creating a Styled
Document.
Hour 11. Controlling Styles with JavaScript.
Dynamic Styles. Working
with Colors. Changing Text Styles Dynamically. Workshop:
Using Dynamic Styles.
Hour 12. Creating Consistent Styles.
Using Restraint. Choosing
Colors. Choosing Fonts. Margins and Borders. Supporting
Older Browsers. Workshop: Creating Multiple-Choice
Styles.
IV. DYNAMIC HTML IN ACTION.
Hour 13. Creating Drop-Down Menus.
Overview. Objects and
Events. Creating the HTML Document. Creating the JavaScript
Functions. Workshop: Creating the Complete Example.
Hour 14. Creating a Menu Tree.
Overview. Objects and
Events. Creating the HTML Document. Creating the JavaScript
Functions. Workshop: Finishing and Testing the Menu.
Hour 15. Creating DHTML Text Effects.
Creating Blinking Text.
Moving Text. Fading Text. Workshop: Creating a Scrolling
Message.
Hour 16. Using DHTML for Animation.
Methods of Web Animation.
Creating a Simple Animation. Workshop: Creating an Animated
Navigation Bar.
V. LEARNING ADVANCED TECHNIQUES.
Hour 17. Dealing with Browser Differences.
DHTML Browser Differences.
Detecting Browsers. Writing Cross-Browser DHTML.
Accommodating Older Browsers. Creating Cross-Browser
Functions. Workshop: Supporting Old and New Browsers.
Hour 18. Using DHTML with Forms.
Dynamic Forms. Modifying
Form Elements. Adding Form Elements. Accepting Data from
Forms. Workshop: Creating a Dynamic Order Form.
Hour 19. Using Dynamic Fonts.
How Dynamic Fonts Work.
Dynamic Fonts and Browsers. Defining Dynamic Fonts.
Workshop: Using Dynamic Fonts.
Hour 20. Troubleshooting DHTML.
Tips for Error-free DHTML.
Avoiding Common Mistakes. Analyzing Errors. Testing Dynamic
Documents. Testing Browser Compatibility. Using Debugging
Tools. Workshop: Debugging a Document.
VI. PUTTING IT ALL
TOGETHER.
Hour 21. Creating a Dynamic Site.
Creating Complex DHTML
Sites. Creating the HTML Document. Creating the JavaScript
File. Workshop: Adding a Scrolling Message.
Hour 22. Creating Complex Animations.
Following the Mouse
Pointer. Animation with Multiple Images. Workshop:
Completing and Testing the Animation.
Hour 23. Creating a DHTML Game.
Creating the HTML
Document. Planning Dynamic Features. Creating Graphics.
Creating the JavaScript Functions. Creating the Word List.
Workshop: Adding the Style Sheet.
Hour 24. DHTML Tips and Tricks.
Creating Tool Tips. Where
Do You Go from Here? Workshop: Creating a Scrolling
Window.
VII. APPENDIXES.
Appendix A: Other JavaScript and DHTML Resources.
JavaScript Web Sites.
Dynamic HTML Web Sites. Other Sites. Other Books.
Development Tools. Debugging Tools and Resources.
CGI
Resources.
Appendix B: Glossary.
Appendix C: Browser Compatibility Chart.
Appendix D: DOM Quick Reference.
DOM Level 0. DOM Level
1.
Index.