JavaScript is everywhere. It’s a key component of today’s Web—a powerful, dynamic language with a rich ecosystem of professional-grade development tools, infrastructures, frameworks, and toolkits. This book will get you up to speed quickly and painlessly with the 35 key JavaScript tasks you need to know.

Part of the Pragmatic Guide series

Out of Print

This book is currently out of print.

About this Book

  • 160 pages
  • Published:
  • Release: P1.0 (2010-11-22)
  • ISBN: 978-1-93435-667-8

The task-oriented two-page spreads get you up and running fast. The left pages explain the underlying implementation for each task, and the right pages contain code snippets for that task, along with cross-references to related tasks.

You’ll learn essential JavaScript tasks in a framework-agnostic way. Learn how to manipulate the DOM and CSS, and how to use event handling and timers. You’ll discover JavaScript tricks for user interface functionality: tooltips, lightboxes, image processing, infinite scrolling, and more. You’ll work with forms for receiving and validating input and explore the client-server relationship with cookies, JSON, and Ajax, as well as mashups with Twitter, Flickr, and geo-related APIs. We round it off with a cheat sheet that gives you JavaScript at a glance.

Use this Pragmatic Guide to get started creating your own killer web applications, quickly and professionally.

Contents and Extracts

For more information on the Pragmatic Guide Series, please see the faq

Full Table of Contents


  • Bread and butter: pure JavaScript
  • The DOM, events, and timers
  • UI tricks excerpt
  • Form-fu excerpt
  • Talking with the Server Side
  • Making mashups excerpt

About the Author

Christophe Porteneuve has been doing IT R&D for more than 10 years, specializing early in Web development. He joined Prototype Core in 2006, wrote Prototype and in 2007, and sometimes speaks at conferences such as The Ajax Experience. He’s the CTO of in Paris, France, where he lives with his wife, Elodie.

Comments and Reviews

  • There are a number of JavaScript books on the market today, but most of them tend to focus on the new or inexperienced JavaScript programmer. Porteneuve does no such thing, and this Pragmatic Guide is a better book for it. If you’re a novice, go elsewhere first, and then when you have some scripting under your belt, come back; if you’ve worked with JavaScript before, then Pragmatic Guide to JavaScript takes a set of techniques that you may have heard about or seen and makes them useful to you. Recommended.

    —Stuart Langridge, @sil
  • An impressive collection of very practical tips and tricks for getting the most out of JavaScript in today’s browsers, with topics ranging from fundamentals such as form validation and JSON handling to application examples such as mashups and geolocation. I highly recommend this book for anyone wanting to be more productive with JavaScript in their web applications.

    —Dylan Schiemann CEO at SitePen cofounder of the Dojo Toolkit
  • I wish I had owned this book when I first started out doing JavaScript! Pragmatic Guide to JavaScript will take you a big step ahead in programming real-world JavaScript by showing you what is going on behind the scenes in popular JavaScript libraries and giving you no-nonsense advice and background information on how to do the right thing. With the condensed years of experience of one of the best JavaScript developers around, it’s a must-read with great reference to everyday JavaScript tasks.

    —Thomas Fuchs Creator of the framework