It seems that in a recent server shuffle I misconfigured a few things and haven’t been getting update that I should have so many of your comments and emails have gone unanswered. Sorry about that! The source is also broken so download it here:
The Source
Reviews — January 14, 2008 at 7:31 am
A few more reviews have been posted.
Thanks!
Reviews — November 29, 2007 at 4:18 pm
Roger Johansson over at 456 Berea Street just posted a great little script to automatically populate text in a form input — using the input’s title attribute. The input’s title will appear in the input unless you enter something else. Very classy and unobtrusive. I like a lot. Check it out.
My uncle did play the accordion as a young lad but that was long before I was born. Fortunately, the accordions’ I’m referring to here are of a JavaScript nature. Accordion’s are those fancy sliding dividers that let you compress a lot of content behind simple little bars. Tutorial blog has collected a number of different ones for your dancing pleasure. Enjoy.
I’ve been crazy busy lately with projects at We-Create so my RSS feed reader has been quickly filling up with unread posts. I finally took a bit of time tonight to re-visit it and came across a few gems I thought I’d share.
Debugging JavaScript
Jesse Skinner over at The Future of the Web had a great little post on debugging javascript. Basically by adding a simple function to your site:
function debug_mode() {
return location.hash == '#debug';
}
you can degub any code JavaScript:
if (debug_mode()) {
alert('alert away!');
}
and all you have to do is add #debug to the URL. Brilliant! That’s kinda an obvious thing to do so I’m not sure why didn’t I think of it. Thanks Jesse.
DOMAssistant 2.0
Robert Nyman wrote me awhile back to let me know that DOMAssistant version 2.0 has been released. New features include:
- Chainability
- AJAX Module
- Easier DOMReady
- XPath Support
These make for some great additions to the little library, good work Robert and team.
No events with innerHTML
Friendly Bit had a post about events disappearing after using innerHTML to modify the DOM. When you add events using the event attribute and then modify the parent’s innerHTML property, it seems that you’re events all go bye-bye. Check out the article for a better explanation but it’s just another reason to avoid innerHTML altogether.

A few readers have been asking about that remember.pdf mentioned on page 5 that acts as a poster so you can remember some important things while writing your DOM scripts. Well, it seems I lost it but it’s back again. You can download it here. Thanks to those who noticed it was missing.

Tablecloth is a nifty little addition to your DOM scripting library that will automagically give your HTML tables a bit of flare. It highlights columns and rows as well as which cells you clicked in a well formatted table. The best part is that it does it all using class names on the table elements so that the style is extracted nicely to the CSS file, not the JavaScript. Check it out.
Apress and friends of Ed have announced a huge sale this month with most titles on Bookpool.com at 50% off, including Advanced DOM Scripting. So here’s a chance for all of you who’ve been waiting for a great deal. Get Advanced DOM Scripting today!
Just a heads up to new readers…
jQuery, one of the libraries I discuss in the book, has a new release. It’s made a lot of great improvements but in doing so a few features were axed. You can read the release notes for the full list of changes but it doesn’t affect the book too much.
The one feature I discussed was axed. The built-in XPath selectors have been moved to a plug-in and are no longer part of the default library.
After I play with it some more I’ll post an update to the errata.