There’s a tool for everything somewhere on the web.
Whilst about 99.5% perfect (some indentation issues remain), I’ve found a pretty nice, easy to use, and very feature-rich HTML code formatter. See http://www.mycoolform.com/index.php?lang=en for the formatter.
It’s something I was looking for a while back but didn’t have so much luck to stumble onto something so useful. Previously, I was looking for something that would fix up some HTML to XHTML and whilst I’m sure something was out there, the problem was I needed something that would do the job, but stay away from TAL attributes on my elements. The things that I had found did “too good” of a job and dumped those elements, which is fair enough because things like ‘tal:content=’ isn’t valid XHTML.
This formatted though does new lines, auto-indentation, change of case for tags and attributes (hello XHTML compliance), comment removal and white space elimination. Great stuff; so many thanks to its author (who is anonymous I guess?).
So, you’ve got a website that you’ve made and you’ve used a Flash movie on it. Okay, no worries. Now, what if you tried to add a (non-form-element) drop-down menu or some AJAX-ed content into the site, and found the Flash movie actually acted as an overlay?
This problem doesn’t seem consistent. Different OSs, browsers, and Flash versions don’t indicate consistency – that’s what I’ve seen anyway. Nevertheless, the problem persists for some users and it’s down-right annoying.
The fix? Make your Flash code look similar to this:
<object data="my-movie.swf" type="application/x-shockwave-flash" height="100" width="200"> <param name="movie" value="my-movie.swf" /> <param name="quality" value="high" /> <param name="embed" value="transparent" /> <param name="wmode" value="transparent" /> <param name="menu" value="false" /> <img src="alternate.jpg" alt="ARCS - Revolutionising Collaboration" height="100" width="200" /> </object>
That there should be entirely XHTML compliant (and completely cross-browser compatible) code for creating a Flash object on your page that’ll place nice with other content.
