| | Copyright |
| | Preface |
| | Chapter 1. Introduction and First Looks |
| | | Section 1.1. Twisted History: Specs and Implementations |
| | | Section 1.2. Cross-Browser Incompatibility and Other Common JavaScript Myths |
| | | Section 1.3. What You Can Do with JavaScript |
| | | Section 1.4. First Look at JavaScript: "Hello World!" |
| | | Section 1.5. The JavaScript Sandbox |
| | | Section 1.6. Accessibility and JavaScript Best Practices |
| | Chapter 2. JavaScript Data Types and Variables |
| | | Section 2.1. Identifying Variables |
| | | Section 2.2. Scope |
| | | Section 2.3. Simple Types |
| | | Section 2.4. Constants: Named but Not Variables |
| | | Section 2.5. Questions |
| | Chapter 3. Operators and Statements |
| | | Section 3.1. Format of a JavaScript Statement |
| | | Section 3.2. Simple Statements |
| | | Section 3.3. Conditional Statements and Program Flow |
| | | Section 3.4. The Conditional Operators |
| | | Section 3.5. The Logical Operators |
| | | Section 3.6. Advanced Statements: The Loops |
| | | Section 3.7. Questions |
| | Chapter 4. The JavaScript Objects |
| | | Section 4.1. The Object Constructor |
| | | Section 4.2. The Number Object |
| | | Section 4.3. The String Object |
| | | Section 4.4. Regular Expressions and RegExp |
| | | Section 4.5. Purposeful Objects: Date and Math |
| | | Section 4.6. JavaScript Arrays |
| | | Section 4.7. Associative Arrays: The Arrays That Aren't |
| | | Section 4.8. Questions |
| | Chapter 5. Functions |
| | | Section 5.1. Defining a Function: Let Me Count the Ways |
| | | Section 5.2. Callback Functions |
| | | Section 5.3. Functions and Recursion |
| | | Section 5.4. Nested Functions, Function Closure, and Memory Leaks |
| | | Section 5.5. Function As Object |
| | | Section 5.6. Questions |
| | Chapter 6. Catching Events |
| | | Section 6.1. The Event Handler at DOM Level 0 |
| | | Section 6.2. Questions |
| | Chapter 7. Forms and JiT Validation |
| | | Section 7.1. Accessing the Form |
| | | Section 7.2. Attaching Events to Forms: Different Approaches |
| | | Section 7.3. Selection |
| | | Section 7.4. Radio Buttons and Checkboxes |
| | | Section 7.5. Input Fields and JiT Regular Expressions |
| | | Section 7.6. Questions |
| | Chapter 8. The Sandbox and Beyond: Cookies, Connectivity, and Piracy |
| | | Section 8.1. The Sandbox |
| | | Section 8.2. All About Cookies |
| | | Section 8.3. Alternative Storage Techniques |
| | | Section 8.4. Cross-Site Scripting (XSS) |
| | | Section 8.5. Questions |
| | Chapter 9. The Basic Browser Objects |
| | | Section 9.1. BOM at a Glance |
| | | Section 9.2. The window Object |
| | | Section 9.3. Frames and Location |
| | | Section 9.4. history, screen, and navigator |
| | | Section 9.5. The all Collection, Inner/Outer HTML and Text, and Old and New Documents |
| | | Section 9.6. Something Old, Something New |
| | | Section 9.7. Questions |
| | Chapter 10. DOM: The Document Object Model |
| | | Section 10.1. A Tale of Two Interfaces |
| | | Section 10.2. The DOM and Compliant Browsers |
| | | Section 10.3. The DOM HTML API |
| | | Section 10.4. Understanding the DOM: The Core API |
| | | Section 10.5. The DOM Core Document Object |
| | | Section 10.6. Element and Access in Context |
| | | Section 10.7. Modifying the Tree |
| | | Section 10.8. Questions |
| | Chapter 11. Creating Custom JavaScript Objects |
| | | Section 11.1. The JavaScript Object and Prototyping |
| | | Section 11.2. Creating Your Own Custom JavaScript Objects |
| | | Section 11.3. Object Detection, Encapsulation, and Cross-Browser Objects |
| | | Section 11.4. Chaining Constructors and JS Inheritance |
| | | Section 11.5. One-Off Objects |
| | | Section 11.6. Advanced Error-Handling Techniques (try, throw, catch) |
| | | Section 11.7. What's New in JavaScript |
| | | Section 11.8. Questions |
| | Chapter 12. Building Dynamic Web Pages: Adding Style to Your Script |
| | | Section 12.1. DHTML: JavaScript, CSS, and DOM |
| | | Section 12.2. Fonts and Text |
| | | Section 12.3. Position and Movement |
| | | Section 12.4. Size and Clipping |
| | | Section 12.5. Display, Visibility, and Opacity |
| | | Section 12.6. Questions |
| | Chapter 13. Moving Outside the Page with Ajax |
| | | Section 13.1. Ajax: It's Not Only Code |
| | | Section 13.2. How Ajax Works |
| | | Section 13.3. Hello Ajax World! |
| | | Section 13.4. The Ajax Object: XMLHttpRequest and IE's ActiveX Objects |
| | | Section 13.5. Working with XMLor Not |
| | | Section 13.6. Google Maps |
| | | Section 13.7. Questions |
| | Chapter 14. Good News: Juicy Libraries! Amazing Web Services! Fun APIs! |
| | | Section 14.1. Before Jumping In, A Word of Caution |
| | | Section 14.2. Working with Prototype |
| | | Section 14.3. Script.aculo.us: More Than the Sum of Its Periods |
| | | Section 14.4. Sabre's Rico |
| | | Section 14.5. Dojo |
| | | Section 14.6. The Yahoo! UI |
| | | Section 14.7. MochiKit |
| | | Section 14.8. Questions |
| | Appendix 1. Answers |
| | | Section A.1. Chapter 2 |
| | | Section A.2. Chapter 3 |
| | | Section A.3. Chapter 4 |
| | | Section A.4. Chapter 5 |
| | | Section A.5. Chapter 6 |
| | | Section A.6. Chapter 7 |
| | | Section A.7. Chapter 8 |
| | | Section A.8. Chapter 9 |
| | | Section A.9. Chapter 10 |
| | | Section A.10. Chapter 11 |
| | | Section A.11. Chapter 12 |
| | | Section A.12. Chapter 13 |
| | | Section A.13. Chapter 14 |
| | Colophon |
| | Index |