Javascript Strikes Back

While I’m working over at Message, most of work consists of fairly hardcore PHP and MySQL.

This week, though, I’ve found myself writing an unusual amount of Javascript.

Over on the Brighton New Media mailing list, I found myself responding to three separate calls for assistance with Javascript issues: putting content into a textarea, avoiding image cache (or reload) and a CSS nav quandry.

Meanwhile, I’ve also been adding some Javascript tweaks to this site.

I’ve been trying to plug what Dave Shea calls "the RSS usability hole" by intercepting clicks on the button that leads to my RSS feeds and popping up a window with a brief explanation of RSS. The idea being that people who don’t know what RSS is aren’t confronted with a page of apparent gibberish. The link can still be dragged (or copied and pasted) into a newsreader.

I’ve also been tightening up the way my image galleries work. By default, each gallery shows the first image in the set instead of just a blank image. Clicking on the "random image" feature also takes you straight to that image instead of just straight to that gallery.

Playing around with Javascript and the DOM these days is a far cry from the first version of this site. Back then, just about every browser had its own Document Object Model and trying to get even simple things to work involved a lot of forking and hacks. It’s probably because of that inconvenience (and the associated cost) that DHTML never really took off in a big way.

These days, though, using little bits of DHTML magic can be quick and easy and still work across a huge range of browsers.

Viva standards!

Perhaps it’s time for cross-browser DHTML to make a comeback: the CSS/Javascript reunion tour.

Have you published a response to this? :