LEGO Heavy Weapons now on sale! Use coupon code ARMORY to get 30 percent off the book.

Book of JavaScript, 2nd Edition

A Practical Guide to Interactive Web Pages
by thau!

December 2006, 528 pp.
ISBN: 978-1-59327-106-0

This book is currently out of stock, but the ebook is still available
Contents | Reviews | Updates

"Makes JavaScript wizardry more accessible than ever for experts and beginners alike."
Jesse James Garrett, creator of the term "Ajax"

View a sample chapter, Chapter 2: Using Variables and Built-In Functions to Update Your Web Pages Automatically

Visit the book's companion site for code samples, images, and additional resources. For updates and corrections, visit the errata page.

With JavaScript, you can add interactivity, animation, and other tricks to your web pages quickly. But this isn't just a book of scripts for you to cut and paste into your HTML, only to find out later that nothing works as you'd expected. Using real-world examples as the starting point, author thau! walks you step by step through various scripts and explains how they produce the effects you want.

Because no discussion of JavaScript today is complete without coverage of Ajax, this thoroughly updated second edition includes new chapters on Ajax, so you can get up to speed with this valuable method for creating truly dynamic web pages. This second edition of the best-selling The Book of JavaScript also features revised appendices and new examples throughout to reflect today's web environment. Inside, you'll learn to:

  • Work with frames, forms, cookies, and alarms
  • Use events to react to a user's actions
  • Perform image swaps and rollovers
  • Program your own functions to produce customized solutions
  • Store user preferences and build a shopping cart
  • Use Dynamic HTML to turn web pages into multimedia applications

If you need to spruce up tired-looking pages, The Book of JavaScript, 2nd Edition will help take your site from bland to brilliant.

BONUS: Includes a complete reference to all JavaScript objects and functions, including examples, properties, methods, handlers, and browser compatibility!


About the Author

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 he 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 Ph.D. in computer science at UC Davis.


Table of Contents

Chapter 1: Welcome to JavaScript!
Chapter 2: Using Variables and Built-in Functions to Update Your Web Pages Automatically
Chapter 3: Giving the Browsers What They Want
Chapter 4: Working with Rollovers
Chapter 5: Opening and Manipulating Windows
Chapter 6: Writing Your Own JavaScript Functions
Chapter 7: Providing and Receiving Information with Forms
Chapter 8: Keeping Track of Information with Arrays and Loops
Chapter 9: Timing Events
Chapter 10: Using Frames and Image Maps
Chapter 11: Validating Forms, Massaging Strings, and Working with Server-Side Programs
Chapter 12: Saving Visitor Information with Cookies
Chapter 13: Dynamic HTML
Chapter 14: Ajax Basics
Chapter 15: XML in JavaScript and Ajax
Chapter 16: Server-Side Ajax
Chapter 17: Putting It All Together
Chapter 18: Debugging JavaScript and Ajax
Appendix A: Answers to Assignments
Appendix B: Resources
Appendix C: Reference to JavaScript Objects and Functions
Appendix D: Chapter 15's Italian Translation Script and Chapter 17's To Do List Application

(top)

Reviews

"Anyone who wishes to learn JavaScript in a practical and relaxed way, by reading clearly explained sample projects and their code, should be well pleased with The Book of JavaScript, 2nd Edition."
Slashdot, March 7, 2008 (Read more)

"A worthy successor to the first edition. By the time the reader is finished with this text, he will be well experienced in the use of JavaScript. The book is current and introduces AJAX without making it the "bait" that is supposed to attract the reader to the text. There are plenty of fine publications written on JavaScript on the market, but I consider Thau's work among the best."
Linux Magazine, March 2008 (Read More)

"Presented in an entertaining, practical format... it will remain as a valuable reference on my bookshelf."
OS News, February 21, 2008 (Read More)

"Dave Thau has knocked another one out of the park... every topic is well written and covered in-depth... If you are new to JavaScript, if you want to refresh skills, The Book Of JavaScript is a great place to get you up to speed."
Blogcritics, January 20, 2008 (Read More)

"Provides the basics in a fashion that any embedded developer will appreciate . . . covers all of the important details. If you want to get your feet wet with JavaScript and AJAX, then this is the book for you."
Electronic Design, January 16, 2008 (Read more)

"Thau! has been demonstrating his JavaScript wisdom since before it was cool. Now, this new edition of his classic text makes JavaScript wizardry more accessible than ever for experts and beginners alike."
Jesse James Garrett, creator of the term "Ajax" and author of The Elements of User Experience

"The fastest way to killer JavaScript chops!"
Stewart Butterfield, Co-Founder, Flickr.com

"The new version of The Book of JavaScript offers the same elegant simplicity, but now includes the whiz-bang popular advances like working with the DOM and AJAX."
Ted Rheingold, Top Dog, Dogster, Inc. (Dogster.com and Catster.com)

"A truly awesome book for both people totally new to JavaScript, as well as seasoned and cynical web programmers."
Luke's Blog (Interaction Designer at Six Apart for Movable Type), December 19, 2006 (Read more)

"Holy cow -- this book is amazingly comprehensive."
Wired News, December 6, 2006 (Read more)

thau!, author of The Book of JavaScript interviewed in Java Developer's Journal, February 27, 2008

(top)