Apr 052010
Product Description
Using a cookbook approach, The JavaScript Anthology will show you how to apply JavaScript to solve over 101 common Web Development challenges. You’ll discover how-to: Optimize your code so that it runs faster Create Ajax applications with the XmlHttpRequest object Validate web forms to improve usability Take control of your web pages with the DOM Ensure that your JavaScript code is accessible Create slick drop-down menu systems Included in this book is extensive c… More >>
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks


This book is for advanced beginners and middling experienced developers who not only want a solid repository of the latest JavaScript but who also demand to know why these scripts are superior to what they can find in older sources.
Finding what you want is easy because the book has a consistent Problem -> Solution -> Discussion format that facilitates homing in on what you need at the moment. The discussion is where the true learning value is concentrated for those who want to go beyond dealing with their current production challenge.
I don’t recommend this book if your focus involves making form-based applications or you make applications and web sites that use or display data tables. The form scripting in the book is very elementary. Surprisingly, the book contains *no* data table display or table manipulation scripting section, although it handles basic column sorting in one chapter.
Quibble: in a book otherwise packed with scripting best practices, Chapter 12 “Using JavaScript with CSS” trips up when it focuses so much attention on how to change style property values. The best practice is to change an object’s style class (className) rather than embed specific property values in scripted code. On agile coding teams, it is *very* important to keep scripted behavior and the presentational layer separate.
Otherwise, this is a very solid reference and I’m glad I bought it. The chapter on scripting while coping with accessibility concerns was unique and of superior value.
Rating: 4 / 5
You would think that by the title of this book, you would only use maybe a chapter or two to learn something in particular; or that this book is a just a copy and past DHTML book, but you would be so wrong. Even a beginner in JavaScript would be able to follow the smart and easy to follow examples in this book. The author shows the real ways to debug and figure out your syntax error right at the beginning.
After the basics of the first chapter, it slowly covers each topic (Numbers, Strings, Arrays, DOM, Forms, Cookies, etc.) slowly and with such care that it is impossible to get lost or not understand what the author is saying.
Each chapter is covered in 2 ways: A regular progression of understanding each topic and intermingling “how-to” sections (solutions) to get the readers attention. It is also a great way for readers who already know JavaScript fairly well to find a particular topic they are looking for.
I hate 800+ page books (i.e. Bible books) that can take you so long to find a particular topic or just ramble on and never really teach you anything. This book gives just enough detail with over-explaing, but don’t think the book is too brief! I can easily breeze through this book and know exactly how to find the answer in minutes and understand what the author is saying.
I’ve been using JavaScript for a couple years now as well as teaching part-time web design and I’ve found many chapters very useful already, specifically: Chapter 5 (Navigating the DOM), Chapter 6 (Forms and validation), Chapter 10 (Working with Images), Chapter 13 (Basic Dynamic HTML), and Chapter 15 (DHTML Menus and Navigation). I could use this book for an entire course (15 weeks) and have more than enough material.
I’ve never seen a book that covers how to create a complete professional navigation system (Chapter 15) before. Most people just copy an paste code from sites like (DynamicDrive.com) for fancy DHTML effects, but I always wanted to understand how it was done. All the other JavaScript books I have purchased either never focused on it or was too old to cover the latest browser standards (IE 6, Firefox 1.x, Opera 8). This book has it all.
If you really want to understand JavaScript, get this book. It’s worth every penny…
Rating: 5 / 5
This is an excellent next-step up from an introduction to Javascript and looks at its use in real world situations. You will need to be reasonably fluent in the language to get the best out of it.
The book presents a topic as a question and then presents code to action that query as a solution, then goes through that code in a discussion section. This is where I have a relatively minor criticism of this book; the necessities of discussing the code do not always mesh well with the question and answer format of the layout.
The authors have gone to great effort to ensure that the book is as up-to-date as possible, though this is a rapidly moving target of course, and detail how to ensure that the code will run on as many platforms as possible, rarely giving up and saying ‘forget it..’, though this proved necessary in a number of the more esoteric options and older browsers.
A highly recommended read if you are looking for a quick solution, or a detailed understanding of what’s going on.
Rating: 4 / 5
I purchased this book out of desperation after using a 1000 page Javascript Wrox book published in 2000 that was worse than useless. The author’s blog posting here is very accurate: it is a modern javascript book that gives usable solutions and concepts that work well. I recommend this book to anyone who has at least some programming background and is sick of cut and pasting garbage code from other mickey mouse tutorial sites that break at the slightest change. It is also a great start for working with AJAX, which is what I needed it for.
That said, the book is surprisingly a great read. I am reading this book cover to cover and also use it as an every day reference with dozens of tips. It is obvious the authors have worked extensively with web sites and write from experience. Thanks for a job well done!
Rating: 5 / 5
I didn’t really think I needed this book — I have sever other JavaScript books, including the O’Reilly JavaScript Cookbook, and it seemed like this would just be a duplication. But I kept reading really positive reviews of this and other SitePoint books on sites that I trusted, so I decided to take a flier on it.
I’m really glad I did. Unlike some of the O’Reilly books, which are dated at this point, this has really up-to-date, professional code that incorporates best practices. Depending on what kind of JavaScript code base you need to integrate with, you may be able to use this code as-is in many instances. Even if you need to modify it for your own uses, you will never find poorly-organized hackwork here.
Also nice is the up-to-date topic selection. Classics like DOM, form validation, drop-down menus, and cookies are supplemented with topics about accessibility, XMLHttpRequest, in-page dialogs, and using class prototypes. When the authors tell you how to launch popups, they also tell you about all the pitfalls and problems.
No cookbook is going to cover ever possible topic (personally, I would have liked to see JSON examples), but this one is about as complete as you could reasonably ask for. Really, the only downside about this book that I can see is that you need to have at least an intermediate understanding of JavaScript to understand what’s going on. There isn’t a lot of handholding, and you will likely want to own both a good tutorial and a solid reference on JavaScript and spend some time with them before you’re ready for this book. But if you have a good working knowledge of JavaScript and are looking for practical, well-written examples of how to incorporate new techniques into your code, you won’t find a better book than this one.
Rating: 5 / 5