I’ve been working for about the past 6 hours converting a large PHP project to be XHTML compliant. It was an arduous process, but the nice syntax highlighting helped and the search and replace function saved me a ton of time. Or so I thought.
One of the routine (or so I thought) changes I made was converting all the onMouseOver and similar attributes to be lowercase. This is required for validation and for the javascript in the behaviours to be executed (in strict mode). The first time I ran everything through the validator there were hundreds of errors, and so for about 3 hours the onmouseover case errors escaped my attention. Finally I came to a point where that was all that was left. Try as I might I couldn’t find the code in question. I searched through all the include files, yet still nothing returned a case sensitive match to what I was seeing in the source. Then I did a case insensitive search through every occurrence, and double checked that everything was lowercase. The file must have been saved dozens of times and uploaded to the server just as many times. I thought the validator must be caching it or something, anything, so I waited and tried again at different intervals. I restarted Apache, I loaded and unloaded the PHP-Accelerator from the php.ini file, with subsequent restarts.
Finally at some point I fired up trusty Homesite to see if maybe I could spot it with that. Much to my surprise, the case of every onmouseover was capitalized just like everything was saying it was. It turns out even though Dreamweaver said it made the search and replace changes, and showed that it made the changes, it hadn’t made the changes at all.
This has been enough for me to give it up entirely. Whatever time I might have saved since it came out using the GUI has been irrecoverably lost.
I am having exactly the same problem. I saved my case changes for the onmouseover and onmouseout javascript in my code. I noticed that Dreamweaver MX would automatically change them to onMouseOver and onMouseOut. Thus making the page NOT XHTML compatible.
I am still searching for an answer.
Seems that Dreamweaver MX should have a way to disable such a thing.
Jason
I FOUND THE ANSWER.
You (and I) had Dreamweaver validating our code to be HTML 4.01 code. With this set, Dreamweaver renames javascript items like onmouseover to onMouseOver as it is proper in HTML 4.01.
To use dreamweaver mx to create XHTML pages, change dreamweaver’s validation settings.
go here: http://www.macromedia.com/devnet/mx/dreamweaver/articles/code_standards.html
Look for the section called ‘Validating your code’.
Hmm, Jason’s answer did not solve the problem for me – although it alters the way Dreamweaver validates the code, it still alters the case of the tags.
The following, however did fix it.
Go to Edit-Preferences, select Code Format, and ensure default tag and attribute cases are set to lower. Then tick the ‘override case of’ checkboxes. Dreamweaver will now make all the tags lowercase as files are opened.