DOM Scripting (Book review)

Back in the 1990s I did a whole lot of JavaScripting. I wrote ugly, inaccessible, browser-sniffing, non-standard scripts that didn’t really make things any better for the people using the sites I used those scripts on. Even at the time I had a feeling that something was wrong with the way I used scripting, and when I got into web standards and accessibility I more or less stopped using JavaScript. I am sure many others have been there too.

But web standards and accessibility do not prevent you from using JavaScript. You just have to use it right, and in DOM Scripting Jeremy Keith shows you how by explaining how to write unobtrusive and accessible cross-browser JavaScript that actually adds value to the site.

DOM Scripting is aimed specifically at web professionals who already know how to make proper use of CSS and (X)HTML by separating structural and presentational markup. This book expands on that concept and shows you how to use unobtrusive JavaScript to separate behaviour from structure.

While the book’s introduction states that you don’t need any previous knowledge of JavaScript, I do think it helps a lot if you have some programming experience, either with JavaScript or with some other language.

Jeremy starts off by explaining the basics of JavaScript syntax and then demystifies the Document Object Model (DOM), which is where the name of the book comes from. He then moves on to various techniques that can be used to enhance content and overcome limitations in today’s CSS implementations, and explains how to make an animated slideshow.

At the end of the book there is a chapter that ties the concepts and techniques explained in the previous chapters together by using them to enhance a website. Client-side form validation, which is a very common use for JavaScript, is also covered in this chapter.

Every script in the book is created with progressive enhancement and graceful degradation in mind. Those terms are explained in detail, and more or less define how modern JavaScript should be written.

The whole book is well-written and easy to follow. Like most really good hands-on books, DOM Scripting makes you eager to start putting what you’ve just read about into practice, making your own scripts more efficient and less obtrusive. Well, that’s speaking for myself anyway.

When I learn something new I want to make sure I learn it the right way, and that’s what this book will, so I highly recommend DOM Scripting to all web professionals who aren’t already JavaScript at DOM experts. Whether you have realised that it’s time to add modern JavaScript skills to your skillset or you think it’s time to upgrade your browser-sniffing era scripting skills, this book is for you.

DOM Scripting
Author: Jeremy Keith
ISBN: 1590595335

Posted on August 28, 2006 in Reviews


  1. This is one of those books I’ve picked up 100 times at Border’s, have had in my Amazon wish list for what seems like forever, and have just never gotten around to buying it - something else always jumped out at me more.

    Shortly after reading this review, I finally ordered it from Amazon.

  2. Nice review. I’m in the middle of reading it myself and found what you’ve said to be true. It’s well worth having in one’s library!

  3. Excellent review.

    I just started reading this book having been inspired by all of the current development happening with JavaScript — and jQuery being two big ones — at the moment.

    I’ve used both of those libraries before, but wanted to be sure I was using them in an accessible manner. Plus, I wanted to start doing some original development; this book has been very helpful so far.

  4. This book is the only one that I’ve found that has presented JavaScript programming in a way that makes sense to me. It’s not written by a computer scientist, but by a web developer with practical knowledge about how things really work, and what is practical for a person who is primarily markup/CSS focused to actually grasp and use. Excellent book.

  5. Ditto what Trey said. I’ve gone through other JavaScript books (not to mention countless tutorials, walkthroughs, etc.), but this is by far the clearest and most practical that I’ve found yet. An absolute must-have.

  6. August 28, 2006 by Nate K

    RE: Patrick B Thats one of the main reasons I picked up this book - so that I could start developing for myself. Don’t get me wrong, I love the available frameworks available - I just see them as a little ‘bloated’ for my needs. I want to build something custom that fits my needs.

    Roger, I just finished reading this book as well and absolutely loved it. There were several parts in the book where he explained something, I scratched my head thinking ‘how will that work properly and unobtrusively’, and then Jeremy explain the specifics in the next paragraph. He answered many questions I had about the DOM and using JS in an unobtrusive manner. I love that he brings all elements into play - and KNOWS how to use each. He uses CSS/HTML/JS in a great manner that keeps things neat, tidy, and organized. His last chapter of bringing it all together was an excellent read.

    Im finishing up DHTML Utopia this evening, and I am excited to start using what I have learned. I have already thought out a few spots where it would be benefical to use the DOM on top of an already built system.

    Thanks for the review, and thanks to Keith for a great book!

  7. That last response was from me, somehow my name didnt make it through.

  8. August 28, 2006 by Roger Johansson (Author comment)

    Nate: I kind of guessed that was you :-). I fixed the comment.

  9. Great book! I read it a couple of weeks ago and got some really good ideas right away. The author really makes some good pointers, well at least for me, who’s just getting into DOM and Javascript.

  10. Thanks, Roger. The cheque is in the mail.

  11. August 29, 2006 by Jar Binks

    Is that Jeremy Keith talking in code again? He cannnot let it go.

  12. August 29, 2006 by Martin

    I got the DOM Scripting book.

    My colleagues at work likes the book too. I can’t seem to get the book of them! :)

  13. Definitely a book on my wish list for a while, I just haven’t gotten it yet. JS DOM is probably my weakest area (in fact most times I try to do something with it I feel like I’m walking through a muddy haze stumbling around looking for a branch to grab hold of or random luck to kick in). But this one sounds like a great guide and I -do- intend to get it at some point soon.

  14. It’s a very nice book. Found it at a sale in my local bookshop and have learned very much from it. It got good content but could really have been read thorugh a couple of more times before printing because as far as I remember it’s full of silly little errors. I also get the feeling that he is reexplaining everything in every chapterto get up in the numbers of pages. Gets boring after a while but maybe is good for the memory.

    Overall a very nice book though!

  15. August 29, 2006 by Eystein

    Love the review, and the comments! Makes me all the more confident that I ordered the right book. It should be in my mailbox by the end of the week. Hooray for books!

  16. Nice review. I’m in the middle of reading it. It’s very well written and simple to read and learn from. A good choice if you’re searching for a DOM Scripting-related book.

  17. August 29, 2006 by Maaike

    I never used javascript, (not even in the nineties!) because it just didn’t feel right. However, I bought this book a while ago and now I’m looking forward very much to writing my own scripts. I’ve almost finished the book and I agree with your review: it’s very well-written. I think a good follow-up book (more advanced) would be Sitepoint’s ‘The Javascript Anthology’.

  18. August 29, 2006 by Vern

    I never used javascript, (not even in the nineties!) because it just didn’t feel right.

    Because you had to script for Internet Explorer and Netscape? Javascript has evolved for sure with more cross-browser techniques and remote scripting, but javascript was always interesting to use to enhance a webpage, eg pop-ups, form validation, frames navigation back in 1996. Just ask O’ Reilly!

    My guess is people did not all learn javascript properly back then, they copy and pasted it. From 2000 on, we used some DOM like document.getElementById for dropdowns.

    It is not only DOM scripting that makes Javascript, eg you have screen properties, etcetera.

  19. Nice review. Great book. I have owned it for several months now, but coincidentally just started reading it last night. Now I can’t put it down! It feels great to be learning new stuff that I can actually put to use.

    I think DOM scripting will come more easily to those who have a small amount of prior training in programming, but even rookies need not be intimidated. If you know CSS well, you should be able to follow along.

    I’m looking forward to reading a few more chapters after work tonight. I am such a nerd .

  20. August 31, 2006 by Maaike

    Because you had to script for Internet Explorer and Netscape?

    That too, and many bad examples (mouse trails!) that made me feel uncomfortable about it. And I didn’t need it much for my work… so I learned Flash instead. :-)
    DOM scripting just seems a much more logical approach when you’re used to working with css. I know it’s only part of javascript, but I think it’s a good way to start learning javascript.

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.