Tiffany B. Brown

a mish-mosh of stuff

Posts in: DOM

JavaScript Holy War: What’s your favorite framework or toolkit?
Digital Web has two articles that are related to this post. Check out Excerpt: Accelerated DOM Scripting with Ajax, APIs and Libraries and jQuery Crash Course As the number of web-based applications grow, so do the number JavaScript frameworks and toolkits with the goal of making cross-browser development an easier process. But which to choose? [...] [4 Oct 2007]
Recommended viewing: “Best Practices in Javascript Library Design”
John Resig of jQuery fame gives some tips on writing a JavaScript Library. Source. Also of interest: JavaScript Tips for Novices, Acolytes, and Gurus [28 Aug 2007]
Reebok’s Run Easy
A pretty cool piece of technical work: strictly an (x)HTML, CSS and JavaScript front-end — no Flash necessary: Run Easy. I’m interested to know the firm behind the site. UPDATE: As Paul Irish posted in the comments, Boston-based web firm Molecular developed the site. [7 May 2007]
A generic(-ish) JavaScript form validator function
I tried my hand at developing a reusable form validator function with JavaScript and the DOM. It checks: Whether required fields are empty (where class=”required”) Whether e-mail addresses are valid (where the field name is ‘email’ or ‘Email’) Whether phone and fax numbers match one of several formats (404-555-5555, 404 555 5555, (404) etc. where [...] [9 Apr 2007]
Rounded corners using DOM Scripting and CSS
This is unintentionally similar to Adam Kalsey’s technique. I had the idea and did a proof-of-concept. Then I did a Google search for ‘rounded corners’ and found that he (and about 5011 other folks) had already published something quite similar. I think my method is different enough to warrant a post. And if it isn’t, [...] [29 Nov 2006]
DOM and JavaScript image rollover
It’s a simple script — about nine lines of JavaScript total. Just add the imageSwapIn and imageSwapOut functions to onmouseover and onmouseout event handlers in the containing element for your image (usually a link). The first function takes two parameters: the image id — which you set using the id value, or by using the [...] [30 Oct 2006]
Today’s DOM scripting tip
Something I learned after many hours of lamenting “Why in the hell doesn’t this work in IE 6?” When setting a class name for an element, use element.className instead of element.setAttribute(‘class’,'nameOfClass’) for compatibility with Internet Explorer 6. The latter should work just fine in Internet Explorer 7. I’d avoid using element.style completely to provide the [...] [26 Oct 2006]
Douglas Crockford on the DOM
Via the Web Standards Project: Three videos by Douglas Crockford giving some theory on the Document Object Model and how different browsers handle it. It’s a dry presentation. Like the Sahara. Like twice-burnt toast. Like wind in the desert. I think this was an in-house video for Yahoo! developers, and in that context, I can [...] [25 Oct 2006]