ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  JavaScript: Why You Don't Know More About It
Subject:   I leave javascript disabled like a growing number of others
Date:   2001-05-19 08:08:54
From:   schampeo@hesketh.com
Response to: I leave javascript disabled like a growing number of others

While I agree with tz's assessment that JavaScript can be abused, and that many sites don't test their pages on enough different browsers, and even that many uses of JavaScript (such as overriding built-in browser functionality like the anchor tag, which I personally abhor) fall more properly into the category of "misuse", I still don't see anything in his response that suggests that the problems are with JavaScript itself. They are, rather, problems of people not knowing how best to use JavaScript, or simply not caring if they alienate their audience (due to misguided and probably shortlived attempts to squeeze the last ad banner impression out of their network).


The complaints raised with respect to poorly implemented forms validation, for example, are problems of implementation, not with the language itself. Forms can most certainly be enhanced by JavaScript; just because some people simply don't go far enough for your tastes is an argument for more education, not for abandonment of the language.


You are saying, in essence, "some people use JavaScript when I don't want them to" and "some people don't use JavaScript well enough when I want them to" and "some people can't see the amazing potential of JavaScript for functionality X". All of these are arguments for further education, not for the abandonment of the language.


And though I'd be delighted if I could simply write an article that began, "Hey, all you porn site operators - knock it off with all the popup consoles" and be heeded, I don't think anyone has that sort of power.


Finally, I'd like to add that all of the uses you mention (forms validation, popup windows, navigation) are ways of "enhancing" traditional Web sites, and don't begin to cover the more advanced possibilities inherent in the use of JavaScript and Dyanmic HTML for client-side applications. Bob Stein's Visibone ColorLab (http://www.visibone.com/colorlab/), for example, is an amazing DHTML tool for Web designers, which lets them pick colors and compare and contrast them with others, using a completely dynamic, client-side application. You won't find this on a "traditional" Web site, standing in the way of navigation or popping up from a porn site. The application is the whole point of the page, not "enhancing" your "experience" with a bunch of half-implemented, barely tested, ill-applied JavaScripts.


On the other hand, though, some traditional sites are making what I would call good use of JavaScript and DHTML. MSNBC, for example, uses DHTML to provide more information about some of its stories, with interactive charts and sidebar animations.


Making the decision to disable JavaScript is certainly an easy one to make, and there are many reasons why you might wish to do so. But none of them, in my mind, justify turning it off for good.