Tiffany B. Brown

A web log about web development and internet culture with frequent detours into other stuff.

Posts in: DOM

Web Standards Project releases Acid3
Three years after the Acid2 test was released, the WaSP has developed Acid3. What’s Acid? It’s a reference test designed to help browser developers determine whether they are complying with W3C specifications, and how well they handle invalid code. Acid1 and Acid2 tested for compliance with CSS 1 and CSS 2 specifications. Acid3 also tests for [...] [3 Mar 2008]
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? Well, [...] [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 the field [...] [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 best separation [...] [26 Oct 2006]