Beginning JavaScript with DOM Scripting and Ajax (Book review)

I’ll say it right from the start: this book is great. There are several other books that teach modern JavaScript, but Beginning JavaScript with DOM Scripting and Ajax is really focused on explaining unobtrusive and accessible scripting techniques, which I think is excellent. This book is suitable for JavaScript beginners wanting to learn how to write JavaScript the right way, as well as for more experienced scripters who need to modernise their skills.

The author, Christian Heilmann, is a member of The Web Standards Project’s DOM Scripting Task Force and the author of many great articles on various topics related to Web development and accessibility. In this book he explains JavaScript right from the very basics to some reasonably advanced concepts, while always making sure you understand how to make your scripts accessible and unobtrusive.

I very much like the way Chris takes the time to explain why certain practices make scripts less accessible or usable, and how he repeats the message that you always have to think about what happens when scripting is unavailable or a keyboard user interacts with your script. He rubs that message in for a good reason–if you want to become a respected JavaScripter, there’s just no other way of approaching scripting.

After going through the basics of JavaScript, explaining syntax, data types, and operators, the book moves on to practical examples that explain, among other things, how to change the presentation layer with JavaScript, how to manipulate images and windows (as well as why doing so may be problematic), and how to improve navigation and form handling. As the title of the book reveals, the book also explains how you can use Ajax to retrieve data from the server without reloading the page. The final chapter is a very handy guide to JavaScript debugging and common scripting mistakes.

There is not much in the way of visual bling-bling scripts like drag-and-drop or drop-down menus to be picked up here. What you will learn is almost completely focused on practical, functional, usable scripts that will add real value to the websites or applications you build.

The only complaint I have about this book is a rather minor one: the number of typos. I know I am picky in that regard, but I think this book would have needed at least one more pair of eyes for proofreading. Other than that, Beginning JavaScript with DOM Scripting and Ajax is an excellent book.

Details for Beginning JavaScript with DOM Scripting and Ajax
Author: Christian Heilmann
ISBN: 1590596803

Posted on February 23, 2007 in JavaScript, Reviews


  1. That sounds interesting, the only other book I’ve read is Jeremy Keith’s ‘DOM Scripting’ book which is pretty good too. It similarly goes through the basics of javascript at the beginning to so it’s accessible to those new to the subject.

    It sounds as though Christian Heilman’s book would take things further forwards than DOM Scripting, but for a first DOM book it’s pretty good too.

  2. Beginning AJAX with PHP, from the same series, shares many of this book’s virtues. It’s been a big help at least for me.

  3. I would agree with you with one exception: I was a rank amateur in Javascript when I first purchased this book, and I quickly became lost when syntax that was included in examples early on was sometimes not explained, or adequately explained, in preceding text. My experience was that as a total introduction to the language it wasn’t complete enough.

    I would recommend Flanagan’s Javascript: The Definitive Guide from O’Reilly as a clearer introduction to the basic language, which I found more lucid and well-paced.

    In all other respects, though, Heilmann’s book is indeed a very good one.

  4. It’s the only book I’ve asked for, and got, on Javascript. Having read it, and studied it a bit, I think it was a good choice.

  5. I have to disagree, it talks about beginner level, but then it assumes far too much for a beginner. Me and some others have found it very misleading during certain sections of the book.

    I was disappointed to be honest because I was really looking forward to it.

  6. Roger,

    How does this book compare to the Visual QuickStart JavaScript and Ajax book?

  7. February 24, 2007 by Roger Johansson (Author comment)

    Raphael, Nick: You may have a point about this book not being for absolute beginners. I have probably used JavaScript too much to be able to correctly assess that.

    Nick: How did you find the book “misleading” though?

    Kevin: I have no idea - I haven’t read Visual QuickStart JavaScript and Ajax ;-).

  8. Thanks Roger for this nice review. It is tough to get the Johannson seal of approval. :-)

    As to the “Beginners” problem, I get a lot of feedback like this, especially as it got escalated by the Apress tagline “From Novice to Professional” which gets applied to three books in a series and not only to one. Personally I am annoyed by this as there is no single book that gets you from novice to professional. Being a professional needs experience as well as the right ideas and technical knowledge.

    It is very hard to write a JavaScript book for beginners as it is very tempting to advocate outdated and bad practices as they are dead easy to implement. I’ve blogged about this dilemma and had a hard time reviewing a book that does exactly that. There are lots of JavaScript books out there that give you a great feeling of accomplishment when you read them half way and you go off and implement this knowledge immediately without understanding what you do. This lead to thousands of terrible scripts in the past and as code repositories are good clickmoneymakers they still don’t die out.

    What I wanted to achieve is that readers understand JavaScript and its implications on other parts of web development and the overall accessibility and usability of the product. This even got me bad reviews on Amazon “The book talks about accessibility too much, I wanted to learn JavaScript!”. There is not a single web technology that is as easy as learning the syntax; all of them work hand in hand and you work in a totally unkown environment. It is not a good plan to think you can read a JS beginner book and be a JavaScript developer.

    I’ve had many a heated discussion with my technical editor who claimed that the object literal syntax is too complex for the intended readers. Personally I don’t think that any lead developer would give you a job if you didn’t understand how to keep your scripts from soiling the global namespace these days.

    Books on web development subjects get outdated amazingly fast, and I wanted to start at a higher level than the average beginners book to get you ready for real practical use of JavaScript in a team, and not teach you how to write JS that gets you immediate satisfaction but doesn’t hold water when implemented in a full scale product.

  9. First of all, thanks for reviewing this Roger. I emailed a while back asking about it and you certainly didn’t disappoint.

    I am a novice when it comes to JavaScript but have had little trouble picking up the techniques since I purchased the book back in December. The focus on accessibility was exactly what I was looking for and the examples used are easy to follow and useful in many of the projects I undertake.

    Funnily enough I also noticed the amount of spelling mistakes, but I don’t think they retract from the book in any major way. Thankyou Chris for such a well written guide!

  10. February 24, 2007 by Max Bode

    Sounds great!
    I’ll probably buy it; since I’m far away from being an advanced Javascripter!

  11. You can listen to an interview with the author Christian Heilmann on this Web Axe podcast in which they discuss the book.

  12. Beginning AJAX with PHP, from the same series, shares many of this book’s virtues. It’s been a big help at least for me.

    Thank you for this side

  13. I’ve bought the book a few weeks after it has been published.

    I consider myself expert in client side scripting since I’ve been developing a dhtml/ajax library and I’m the lead developer of an ajax-based startup (sorry Chris although my code used there is unobtrusive the site is mostyl inaccessible (blushing with shame) — but at least we’re aware of that fact and we plan to sort this out before we go out of beta))

    Coming back to the book; I admit I was expecting more advanced examples and less introductory examples (which proves the correctness of the choice of tagline “from novice to professional” — Everyone can find something to read in it).

    I’ve read it in one day. It’s an excellent resource. Each chapter builds the foundations for the next one.

    If you want to learn how to write object based (or object oriented) unobtrusive client side scripting; or if you want to sharpen your JavaScript skills, then Chris’ book is the correct choice for you.

  14. Roger, I hope it’s okay for me to chime in here and try to answer Kevin’s question.

    If you’ve never done any programming at all, and if you look at Chris’s book or David’s book and feel intimidated, then my JavaScript & Ajax Visual QuickStart may be the right choice for you.

    It’s not meant to take you to the point where you can, as Chris says, go out and get a job as a scripter. It’s meant for the person with a solid understanding of HTML and CSS who now wants to add a little more to their toolkit. However, it’s not going to teach you everything anyone would ever want to know about JavaScript and Ajax; it’s a “Quick Start,” like the title says.

    When you’re done with our book, if it hasn’t taught you everthing you want to learn (and it might!), at least you’ll no longer be intimidated by other JavaScript books, and you’ll also be able to tell if it’s teaching up-to-date practices or the old bad stuff.

    With the 6th edition, we (my co-author and I) knew that things had changed in the three years since the fifth edition, so I went through every single script and brought it up to current standards. It was a large task (especially for revision money) but I think the end result was worth it.

  15. March 3, 2007 by Roger Johansson (Author comment)


    Thanks Roger for this nice review. It is tough to get the Johannson seal of approval. :-)

    Hehe. I guess it is, but your book certainly qualifies for it :-).


    Roger, I hope it’s okay for me to chime in here and try to answer Kevin’s question.

    Yes, absolutely. Thanks for clarifying what the intended audience for your book is.

  16. March 8, 2007 by Michael Hessling

    On the strength of Chris’s comment and your review, I bought the book. It arrives today! Yay!

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.