Skip to main content

Search

Navigation

Sponsor: The CSS Anthology

Blog Entry

How Not To Use JavaScript

Published on the 9th of August 2005

By Ethan Poole

The other day I was browsing around Hewlett Packard's website (external link) for a printer driver that would work with my Mac. I never did find the driver, but I don't blame them as the printer is ancient. While browsing I switched tabs for a moment to test the usability of a system I was working on that used "unobtrusive" JavaScript. I turned off Javascript in my browser. After messing around a bit with some coding to compensate for lack of JavaScript support, I switched back to my HP tab.

I instantly saw that the layout was destroyed. All of the coloring and structure was completely discombobulated. I turned on Javascript and saw that the layout again worked. This odd dependency on JavaScript puzzled me, because I've never heard of a designer using JavaScript to do that much in a layout.

Hewlett Packard's use of JavaScript is a fine example of how you shouldn't code. Relying on JavaScript that much for a design to properly function has its gigantic pitfalls. Internet Explorer lacks support for the modern uses of JavaScript (DOM) and many users turn off JavaScript, believing that everything malicious revolves around it.

JavaScript has lied dormant for a few years, when the "Wow, I can move things," coolness factor wore off. Once the wide spread rumor among non-web developers that JavaScript is what hackers use to harm your computer, JavaScript usage considerably dropped. It was too risky to depend a lot on JavaScript for your website.

Due to the lack of Internet Explorer 6's support for truly customizing your JavaScript experience, most users just turn it off. Opera and Firefox users are able to control their cookies and JS preferences quite easily. Recently, Javascript usage has increased as the development of DOM and DHTML take off.

2005 was marked the year of DOM (external link) by many web developers, as the progression of CSS is on hold until CSS3. JavaScript should be used in an "unobtrusive" method, allowing users without the support to still use your website. Hewlett Packard's scripting was completely unusable.

Remember when you're designing webpages, use JavaScript at a point where it only enhances your page. Have a good weekend and code properly!

Tags

Comments

Sponsor: Songbird Media Player

Applications

Categories

Use Opera

Opera 9. Innovation delivered. Download Now (external link)

Archives

Author Profile

Ethan Poole

Ethan is a PHP developer from the sunny state of Florida. He is the Managing Director of Lowter, directing and overseeing all production. Ethan is a crazy fan of the Opera (external link) web browser and he enjoys foreign language.

All Articles by Ethan

Additional Navigation

Copyright © 2004-2008 Lowter

Sponsor Links