Take Up Your Cross-browser Scripting
I wrote this over a year ago, and have been too reluctant (embarrassed?) to release it. I was going to delete it, and found that I was too weak-willed. So my character flaws have trapped me -- I'm unleashing this on the world so I don't have to think about it anymore. Sorry.
Chances are, you've been to more than a few websites proudly proclaiming their Web 2.0 status. You have visited message boards or seen mailing lists full of new users interested in AJAX. And you may have begun to realize that the number of aspiring web professionals who merely ask "How do I...?" vastly outnumbers those who also ask "How should I...?" or even "When should I...?". Whether or not you understand and use concepts like graceful degradation or progressive enhancement, this page is for you.
Do you know JESUS?
If you are guilty of any of these sins, it's likely that you need to come to JESUS:
- You make it clearly known to your users that your site uses AJAX. Bonus points if your intended audience, in all likelihood, doesn't know what AJAX is.
- You defile your <body> by inserting <script> tags into it.
- You often write complex scripts that duplicate behaviors already available through the use of HTML (eg. the tabindex attribute or the submit button).
- You have recently placed an onclick handler attribute within an anchor tag.
What would JESUS do?
JESUS saves client-side CPU cycles, saves bandwidth, saves page load time, saves your alternate-browser visitors frustration, and may save you from embarrassment among your peers when Web 2.0 fully reveals itself as DHTML 2.0 (though it may be too late for that).
But I'm not worthy!
JESUS accepts you wherever you are. If you're just starting to learn web design and scripting, now is the best time to follow. Reference sites like Quirksmode and Adactio will help to get you started. Books like DOM Scripting by Jeremy Keith are also good references.