Buying Options
The Book of JavaScript, Second Edition
Print $39.95
Add to Cart
Print+Ebook $43.95
Add to Cart
Ebook $31.95
Add to Cart
Safari Books Online
Add to Cart
What is this?

Product Editions

  1. The Book of JavaScript, Second Edition - December 2006
  2. Book of JavaScript - October 2000 (out of print)
Description
The Book of JavaScript teaches readers how to add interactivity, animation, and other tricks to their web sites with JavaScript. Rather than provide a series of cut-and-paste scripts, thau! takes the reader through a series of real world JavaScript code with an emphasis on understanding. Each chapter focuses on a few important JavaScript features, shows how professional web sites incorporate them, and takes readers through examples of how they might add those features to their own web sites.
Full Description
Table of Contents
  1. Chapter 1 WELCOME TO JAVASCRIPT!

    1. Is JavaScript for You?

    2. Is This Book for You?

    3. The Goals of This Book

    4. What Can JavaScript Do?

    5. What Are the Alternatives to JavaScript?

    6. JavaScript's Limitations

    7. Getting Started

    8. Where JavaScript Goes on Your Web Pages

    9. Dealing with Older Browsers

    10. Your First JavaScript

    11. Summary

    12. Assignment

  2. Chapter 2 USING VARIABLES AND BUILT-IN FUNCTIONS TO UPDATE YOUR WEB PAGES AUTOMATICALLY

    1. Variables Store Information

    2. Write Here Right Now: Displaying Results

    3. Strings

    4. More About Functions

    5. Parameters

    6. Writing the Date to Your Web Page

    7. How the European Space Agency Writes the Date to Its Page

    8. Summary

    9. Assignment

  3. Chapter 3 GIVING THE BROWSERS WHAT THEY WANT

    1. A Real-World Example of Browser Detection

    2. Browser Detection Methods

    3. Redirecting Visitors to Other Pages

    4. if-then Statements

    5. OR and AND

    6. Putting It All Together

    7. A Few More Details About Boolean Expressions

    8. How Netscape Provides Browser-Specific Content

    9. Summary

    10. Assignment

  4. Chapter 4 WORKING WITH ROLLOVERS

    1. A Real-World Example of Rollovers

    2. Triggering Events

    3. Swapping Images

    4. Working with Multiple Images

    5. What's with All the Dots?

    6. How the Tin House Rollovers Work

    7. Summary

    8. Assignment

  5. Chapter 5 OPENING AND MANIPULATING WINDOWS

    1. Real-World Examples of Opening Windows to Further Information

    2. Working with Windows as Objects

    3. Opening Windows

    4. Closing Windows

    5. Using the Right Name: How Windows See Themselves and Each Other

    6. Moving Windows to the Front or Back of the Screen

    7. Window Properties

    8. More Window Methods

    9. Summary

    10. Assignment

  6. Chapter 6 WRITING YOUR OWN JAVASCRIPT FUNCTIONS

    1. Functions as Shortcuts

    2. Writing Flexible Functions

    3. Getting Information from Functions

    4. Dealing with Y2K

    5. Defining Variables Properly

    6. Summary

    7. Assignment

  7. Chapter 7 PROVIDING AND RECEIVING INFORMATION WITH FORMS

    1. Real-World Examples of Forms

    2. Form Basics

    3. Forms and JavaScript

    4. Reading and Setting Form Elements

    5. Handling Events Using Form Elements

    6. Make this a Shortcut

    7. Using Pull-Down Menus as Navigational Tools

    8. One Last Forms Shortcut

    9. How the Doctors Without Borders Pull-Down Navigation Tool Works

    10. Summary

    11. Assignment

  8. Chapter 8 KEEPING TRACK OF INFORMATION WITH ARRAYS AND LOOPS

    1. Real-World Examples of Arrays

    2. JavaScript's Built-In Arrays

    3. Figuring Out How Many Items an Array Contains

    4. Going Through Arrays

    5. while Loops

    6. for Loops

    7. How AntWeb Checks Off All the Checkboxes

    8. Creating Your Own Arrays

    9. How the Book of JavaScript Tip Box Works

    10. Loops Can Nest

    11. Creating Arrays As You Go Along

    12. Associative Arrays

    13. Summary

    14. Assignment

  9. Chapter 9 TIMING EVENTS

    1. Real-World Examples of Timing Events

    2. Setting an Alarm with setTimeout()

    3. Canceling an Alarm with clearTimeout()

    4. Repeating Timed Actions

    5. Building a Clock with Timing Loops

    6. How the Book of JavaScript Website's Timer Works

    7. How Space.com's Countdown Script Works

    8. A Timed Slide Show

    9. A Safer Version of rotateImage()

    10. Summary

    11. Assignment

  10. Chapter 10 USING FRAMES AND IMAGE MAPS

    1. A Real-World Example of Frames and Image Maps

    2. Frames

    3. Image Maps

    4. How Salon's Bug-Eating Script Works

    5. Summary

    6. Assignment

  11. Chapter 11 VALIDATING FORMS, MASSAGING STRINGS, AND WORKING WITH SERVER-SIDE PROGRAMS

    1. A Real-World Example of Form Validation

    2. Making Sure a Visitor Has Filled Out a Form Element

    3. String Handling

    4. How Dictionary.com's Form Validators Work

    5. Summary

    6. Assignment

  12. Chapter 12 SAVING VISITOR INFORMATION WITH COOKIES

    1. A Real-World Example of Cookies

    2. What Are Cookies?

    3. What Cookies Can and Can't Do

    4. Working with Cookies

    5. Cookie Libraries

    6. A Cookie-Based Shopping Cart

    7. Summary

    8. Assignment

  13. Chapter 13 DYNAMIC HTML

    1. Real-World Examples of DHTML

    2. CSS Basics

    3. JavaScript and DHTML

    4. Making divs Move

    5. Using setTimeout() and clearTimeout() to Animate a Page

    6. Changing the Contents of a div

    7. spans and getElementsByTagName()

    8. Advanced DOM Techniques

    9. Fancy Event Handling

    10. Drop-Down Menus

    11. Summary

    12. Assignment

  14. Chapter 14 AJAX BASICS

    1. A Real-World Example of Ajax

    2. Introduction to Ajax

    3. Creating and Sending Requests

    4. Demonstrating Asynchronicity

    5. Ajax and Usability

    6. To Ajax, or Not to Ajax

    7. Summary

    8. Assignment

  15. Chapter 15 XML IN JAVASCRIPT AND AJAX

    1. A Real-World Example of Ajax and XML

    2. Google Suggest

    3. XML—the Extensible Markup Language

    4. The Rules of XML

    5. Processing XML

    6. Creating a Suggest Application for Translation

    7. Summary

    8. Assignment

  16. Chapter 16 SERVER-SIDE AJAX

    1. Real-World Examples of Server-Side Ajax

    2. The Power of Webservers

    3. A Server-Side Programming Language

    4. PHP Basics

    5. Sending Simple Input to PHP with a GET Request

    6. Creating a Google Suggest Application with an Ajax GET Request

    7. Ajax and the POST Method

    8. HEAD Requests: Getting Information About a Server-Side File

    9. The Caching Problem

    10. File Handling in PHP

    11. When Communication Breaks Down

    12. Automatically Updating a Web Page When a Server-Side File Changes

    13. Summary

    14. Assignment

  17. Chapter 17 PUTTING IT ALL TOGETHER IN A SHARED TO DO LIST

    1. Features of the To Do List Application

    2. To Do List Data Files

    3. To Do List Server Side

    4. The To Do List Client Side, Part 1: The HTML

    5. The To Do List Client Side, Part 2: The JavaScript

    6. A Few Closing Notes

    7. Summary

    8. Assignment

  18. Chapter 18 DEBUGGING JAVASCRIPT AND AJAX

    1. Good Coding Practices

    2. Avoiding Common Mistakes

    3. Finding Bugs

    4. Fixing Bugs

    5. Summary

  1. Appendix ANSWERS TO ASSIGNMENTS

  2. Appendix RESOURCES

    1. Tutorials

    2. Example JavaScript and Ajax Code

    3. Good Ajax Websites

    4. Ajax Frameworks

  3. Appendix REFERENCE TO JAVASCRIPT OBJECTS AND FUNCTIONS

    1. alert() [FF, IE 3]

    2. Anchor

    3. Applet

    4. Area [FF, IE 3]

    5. Array [FF, IE 3]

    6. Button (Including Submit and Reset Buttons)

    7. Checkbox

    8. clearInterval() [FF, IE 4]

    9. clearTimeout() [FF, IE 3]

    10. confirm() [FF, IE 3]

    11. Date

    12. Document

    13. elements[] [FF, IE 3]

    14. escape() [FF, IE 3]

    15. eval() [FF, IE 3]

    16. Event

    17. FileUpload

    18. Form

    19. Hidden

    20. History

    21. HTMLElement [FF, IE 4]

    22. Image

    23. isNaN() [FF, IE 4]

    24. Link

    25. Location

    26. Math [FF, IE 3]

    27. Navigator

    28. Number

    29. Option

    30. parseInt() [FF, IE 3]

    31. parseFloat() [FF, IE 3]

    32. Password

    33. prompt()

    34. Radio

    35. Reset

    36. Screen

    37. Select

    38. setInterval() [FF, IE 4]

    39. setTimeout() [FF, IE 3]

    40. String

    41. Style [FF, IE 4]

    42. Submit

    43. Text

    44. Textarea

    45. this [FF, IE 3]

    46. unescape() [FF, IE 3]

    47. var [FF, IE 3]

    48. window

    49. XMLHttpRequest [FF] and ActiveXObject("Microsoft.XMLHTTP") [IE 5.5]

  4. Appendix CHAPTER 15'S ITALIAN TRANSLATOR AND CHAPTER 17'S TO DO LIST APPLICATION

    1. Chapter 15's Italian Translator

    2. Chapter 17's To Do List Application

  5. COLOPHON

View Full Table of Contents
Product Details
Title:
The Book of JavaScript, Second Edition
By:
thau!
Publisher:
No Starch Press
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
December 2006
Ebook Release:
August 2009
Pages:
514
Print ISBN:
978-1-59327-106-0
| ISBN 10:
1-59327-106-9
Ebook ISBN:
978-1-59327-130-5
| ISBN 10:
1-59327-130-1
Customer Reviews
About the Author
  1. thau!

    Thau! has been creating Internet applications since 1993, starting with bianca.com, the first web-based community on the Internet. He was Director of Software Engineering and Senior Scientist at Wired Digital, and has taught programming languages to hundreds of artists, engineers, and children. He is currently creating data sharing platforms for people studying biodiversity and working towards a PhD degree in computer science at UC Davis.

    View thau!'s full profile page.

  • Book cover of The Book of JavaScript