You are previewing Pro JavaScript™ Techniques.
O'Reilly logo
Pro JavaScript™ Techniques

Book Description

Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.

Expert web developer and author John Resig concentrates on fundamental, vital topics—what modern JavaScripting is (and isnt), the current state of browser support, and pitfalls to be wary of. The book is organized into four sections:

  • Modern JavaScript development using JavaScript the object-oriented way, creating reusable code, plus testing and debugging

  • DOM scripting updating content and styles, plus events, and effect and event libraries

  • How Ajax works, overcoming problems, and using libraries to speed up development of Ajax applications

  • The future of JavaScript looking at cutting edge topics like JSON, HTML5, and more

All concepts are backed up by real-world examples and case studies, and John provides numerous reusable functions and classes to save you time in your development. There are also up-to-date reference appendixes for the DOM, events, browser support (including IE7), and frameworks, so you can look up specific details quickly and easily.

Table of Contents

  1. Title Page
  2. Contents at a Glance
  3. Contents
  4. About the Author
  5. About the Technical Reviewer
  6. Acknowledgments
  7. PART 1: Introducing Modern JavaScript
    1. CHAPTER 1: Modern JavaScript Programming
      1. Object-Oriented JavaScript
      2. Testing Your Code
      3. Packaging for Distribution
      4. Unobtrusive DOM Scripting
      5. Ajax
      6. Browser Support
      7. Summary
  8. PART 2: Professional JavaScript Development
    1. CHAPTER 2: Object-Oriented JavaScript
      1. Language Features
      2. Object-Oriented Basics
      3. Summary
    2. CHAPTER 3: Creating Reusable Code
      1. Standardizing Object-Oriented Code
      2. Packaging
      3. Distribution
      4. Summary
    3. CHAPTER 4: Tools for Debugging and Testing
      1. Debugging
      2. Testing
      3. Summary
  9. PART 3: Unobtrusive JavaScript
    1. CHAPTER 5: The Document Object Model
      1. An Introduction to the Document Object Model
      2. Navigating the DOM
      3. Waiting for the HTML DOM to Load
      4. Finding Elements in an HTML Document
      5. Getting the Contents of an Element
      6. Working with Element Attributes
      7. Modifying the DOM
      8. Summary
    2. CHAPTER 6: Events
      1. Introduction to JavaScript Events
      2. Common Event Features
      3. Binding Event Listeners
      4. Types of Events
      5. Unobtrusive DOM Scripting
      6. Summary
    3. CHAPTER 7: JavaScript and CSS
      1. Accessing Style Information
      2. Dynamic Elements
      3. Animations
      4. The Browser
      5. Drag-and-Drop
      6. Libraries
      7. Summary
    4. CHAPTER 8: Improving Forms
      1. Form Validation
      2. Displaying Error Messages
      3. Usability Improvements
      4. Summary
    5. CHAPTER 9: Building an Image Gallery
      1. Example Galleries
      2. Building the Gallery
      3. Summary
  10. PART 4: Ajax
    1. CHAPTER 10: Introduction to Ajax
      1. Using Ajax
      2. Handling Response Data
      3. The Complete Ajax Package
      4. Examples of Different Data Usage
      5. Summary
    2. CHAPTER 11: Enhancing Blogs with Ajax
      1. Never-Ending Blog
      2. Live Blogging
      3. Summary
    3. CHAPTER 12: Autocomplete Search
      1. Examples of Autocomplete Search
      2. Building the Page
      3. Watching for Key Input
      4. Retrieving the Results
      5. Navigating the Result List
      6. The Final Result
      7. Summary
    4. CHAPTER 13: An Ajax Wiki
      1. What Is a Wiki?
      2. Talking With the Database
      3. The Ajax Request
      4. The Server-Side Code
      5. Handling the JSON Response
      6. An Extra Case Study: A JavaScript Blog
      7. Application Code
      8. Summary
  11. PART 5: The Future of JavaScript
    1. CHAPTER 14: Where Is JavaScript Going?
      1. JavaScript 1.6 and 1.7
      2. Web Applications 1.0
      3. Comet
      4. Summary
  12. PART 6: Appendixes
    1. APPENDIX A: DOM Reference
      1. Resources
      2. Terminology
      3. Global Variables
      4. DOM Navigation
      5. Node Information
      6. Attributes
      7. DOM Modification
    2. APPENDIX B: Events Reference
      1. Resources
      2. Terminology
      3. Event Object
      4. Page Events
      5. UI Events
      6. Mouse Events
      7. Keyboard Events
      8. Form Events
    3. APPENDIX C: The Browsers
      1. Modern Browsers
  13. Index