Sugar Scrub

I am reading Andy Clarke’s Transcending CSS, and in it he encourages looking for Web design inspiration in places other than the Web: cereal boxes, newspapers, magazines, buildings, to name a few. (This is something I’ve done for some time now, but I’ve been making a more conscious effort of late, given his advice.)

This morning I picked up a tube of my wife’s facial scrub. I looked for anything interesting in the design on the front. Then I looked at the back, which contains, among other things, an ingredient list. I wasn’t scanning the ingredient list as much as my eyes just happened to fall on one word:

Saliva.

Saliva! They put saliva in facial scrub? I looked again.

Salvia.

Salvia officinalis (sage) leaf extract. Ah, helps to keep reading past the line break.

Don’t Let A Spec Pick Your Button Type

Ever need to create a <button> of type button when you’re doing a little DOM scripting? Easy enough, right? It should go something like this:

var okButton = document.createElement('button');
okButton.type = 'button';

Nevertheless when you run this code in IE6, you get the super-informative “Communication error” message. It turns out that IE6 (for once) is following the standard. I don’t know what the W3C were thinking, but so sayeth the ECMAScript Language Binding (9 January 2003) spec about the type property of the HTMLButtonElement:

type
This read-only property is a String.

So, the common way to set the property of an HTML element is, according to the standard, right out? I mean, it’s not inconceivable that I would want to create a <button> on the fly with a type that is not the default.

Alas there is a workaround. Ironically, it employs the standard method of setting DOM Node‘s attribute value:

var okButton = document.createElement('button');
okButton.setAttribute('type', 'button');

Works like a charm! Even in IE6.

(I should note that Firefox 3 allows for writing to the button’s type property using the button.type notation. I didn’t test with other browsers to see whether they balk at the button.type notation, but Firefox 2/3, Opera 9.6, and Safari 3, along with IE6/7, are more than amenable to the setAttribute method.)

ColorBurn’s Back

Web designers will be glad to know that ColorBurn is back!

ColorBurn screenshot

Shortly after the first of the year, ColorBurn just stopped working.  I looked around on the Net for an explanation, but all I could find were others also wondering what had happened.  I had given up hope, assuming that the guys at Firewheel just got tired of maintaining it. But here they are with entries for today and the last week as if they never skipped a beat.

And there was much rejoicing.