Monthly Archives: September 2009

I’ve been using Dreamweaver for years. One thing that has always bothered me is that it wants to change my lowercase JavaScript event attributes to camelCase, but it only does this after I close the file. So when I wrote the code, it was valid XHTML 1.0 Strict, but after I saved the file, it no longer was. Dreamweaver was messing up my validation and it was making me furious.

So, if I have typed

<body onload="init()">

Once I’ve closed the file, it’s changed to

<body onLoad="init()">

It will do this for all the tags: onload, onblur, onfocus, etc…

I’ve tried setting my default document type, the validation fallback, everything I could find to XHTML 1.0 Strict, which requires lowercase attributes, but Dreamweaver isn’t smart enough to realize that I mean for this to apply to all of my files, even .php includes.

Finally, I’d had enough and started looking for a solution. I found two different ways of getting this done.

First method: click on Edit -> Preferences -> Code Format. Change “Default tag case” to lowercase, “Default attribute case” to lowercase=’value’, and in “Override case of”, place checkmarks next to Tags and Attributes.

You can also modify each of these attributes in the Tag Library Editor.

Second method: click on Edit -> Preferences -> Code Hints, and under the Menus area, click on the Tag Library Editor link.

A Tag Library Editor window will open. If you wanted to change the body’s onload attribute, for example, you would expand the HTML folder, then the body folder. Highlight onLoad and in the “Attribute case:” menu, select Lowercase, then click “Set default”.

At long last, valid XHTML code from Dreamweaver, even if I shouldn’t be using body onload and inline event handlers in the first place.

For some time, I’ve felt that Ardamis.com was being pulled in two directions. It started out as something of a business card, then it landed me a job, and so the focus changed and it became more of a personal blog. A few years later, I found myself posting mainly code snippets from personal projects and announcements of new site launches.

So, I’ve determined that I’ll keep Ardamis.com as a place for experimentation and create a new site to handle the web development business – Aleph Studios. It’s so new that I have to think sometimes about how Aleph is spelled as I type it.

I’ll be migrating some of the pages away from Ardamis over the next week or two.