- Amazon Student members save an additional 10% on Textbooks with promo code TEXTBOOK10. Enter code TEXTBOOK10 at checkout. Here's how (restrictions apply)
Special Offers and Product Promotions
Customers Who Bought This Item Also Bought
No Kindle device required. Download one of the Free Kindle apps to start reading Kindle books on your smartphone, tablet, and computer.
To get the free app, enter your e-mail address or mobile phone number.
About the Author
Jeremy Keith is a web developer living and working in Brighton, England. Working with the web consultancy firm Clearleft (Clearleft.com), he enjoys building accessible, elegant websites using the troika of web standards: XHTML, CSS, and the DOM. His online home is Adactio.com. Jeremy is also a member of the WebStandards.org, where he serves as joint leader of the DOM Scripting Task Force. When he's not building websites, Jeremy plays bouzouki in the alt.country band Salter Cane (SalterCane.com). He is also the creator and curator of one of the web's largest online communities dedicated to Irish traditional music, TheSession.org.
Inside This Book(Learn More)
Most Helpful Customer Reviews on Amazon.com (beta)
The author focuses on teaching correct methods and approaches, often taking the long way around to make it easier to see the larger picture. This requires a lot of forethought and organization on the part of an author and here the material excels. I don't think anyone will trip up following this guide through the Web script jungle.
The author also avoids the unbearable humor and cutesy language encountered so often in tech books. Thank you Mr. Keith! This is good, clear writing to go with good, clean scripting.
Quibbles: I think the author should have been more concerned with compatibility issues, esp. with IE6, the decrepit but still dominant browser. For instance, on pp 200-01, he recommends using the setAttribute() method to set a class but does not mention that IE improperly demands "className" as a parameter. His snippet would fail in IE. The chapter on CSS scripting was good but barely scratched the surface, not mentioning a bunch of cool scriptable objects.
Overall, this book is a worthy tool that should be welcomed by the target audience.
There are eight chapters that explain and show you how DOM scripting can be used. The final chapter talks about the future of scripting and gives examples of AJAX--a great bonus!
2) ..Explains every single bit of code in a simple language.
3) ..uses simple and easy-to-follow code.
4) ..Starts a chapter with a very simple program and build on it as you read.
6) ..encourages you to 'understand' the code instead of 'memorizing' it
7) ..is written by Jeremy Keith
The book has its weak moments; I mention only two of them, one on the theory, the other on programming:
1) an apparent inconsistency on the properties of childNode array. After having repeatedly stated that this array contains ALL the children of an element node ("including the attribute nodes", see p. 67), it suddenly states (p. 70, p. 154, etc) that the text node of a paragraph node is the first and ONLY node of childNodes. Some tests (using elements that had attributes) confirmed that this last statement was correct. So, apparently, the childNodes array of an element does NOT report its attribute nodes, contradicting the first assertion.
2) the function "showPicture()", the central routine of the example that runs across all the book. All is fine, until Jeremy suddenly decides to change (ch 6, p. 106) its return to "true" when the function fails, and "false" when it succeeds. This is done in order to easily propagate the indication to the browser whether to follow the link or not, but... let me put it this way: would you write routine "start_shuttle()" to return "true" when the requested action fails, just because it makes life "easier" (?) for some intermediate caller routine? let's hope not (for the astronauts' sake).
Furthermore, as show Picture() had multiple returns inside, each one of them had to be tweaked in the "tricky" way; contrast this potential maintenance nightmare with instead returning the right value and simply switching it in the caller. The code (a la D. Conway "self-documented" way) could be:
"var followLink = ! showPicture(); return followLink".
A comment can be added to remove any residual doubt for people maintaing the code in future: "if showPic() succeds, tell browser not to follow the link, and viceversa".
This book relates to the reader in a manner that assumes a shared basic knowledge of XHTML and CSS. It is full of examples of selecting nodes via the getElementByTag method, not unlike the way CSS interacts with the DOM. For instance, with CSS every H1 in a document can be given a certain style.
He also shows how to impliment current-page indicators in a navigation system, but conceeds that things like this are better handled with server-side scripting. It is refereshing to see an author who is humble about his area of expertise, presenting it as a piece of a larger system, and showing areas in which it might not be the best fit for the task at hand.
Look for similar items by category
- Books > Computers & Technology > Computer Science > Software Engineering > Design Tools & Techniques
- Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Software Development
- Books > Textbooks > Computer Science & Information Systems > Programming Languages
- Books > Textbooks > Computer Science & Information Systems > Software Design & Engineering