Javascriptomancy

rafael on 2003-04-03T09:21:21

Hey, look at this clean and clever use of a few lines of javascript, with some CSS tricks, to produce a fast DHTML dropdown menu. (You may have seen it before, if you're interested in DHTML programming -- it's not new news.) Well, it's much better than the thousand-line bloated and cargo-cultified javascript code that we can see floating around, used to display disgraceful, slow and over-heavy menus.

In fact, javascript is still in a situation that's not very different from the pre-CPAN Perl 4 era. Lots of bad code everywhere, no community-endorsed comprehensive archive, programming based on frantic cut-n-paste, poor quality shareware, poor docs. But it's actually becoming possible to do Real Work with it.


SVG

darobin on 2003-04-03T09:55:05

That's one thing I love with SVG: you get real EcmaScript (almost always Mozilla's engine) with a real DOM and you can do really elegant things in tiny bits of code. When you can do that in XHTML too it rocks, I have a ten liner that can do notebook style tabbing in XHTML nicely and swiftly -- it was such a pleasure just throwing it together in ten seconds :) I really hope that ecmascript takes off to become something usable, which in itself only requires that we can stop caring about compatibility problems and some user education.

Unobtrusive DHTML

tex on 2003-04-03T15:37:00

This is my favourite way of using "lists", css and javascript to create dynamic menus.

It's called unobtrisuve because it barely adds any addtitional markup to your document, which is the whole point, plus it degrades very nicely if your browser doesn't support all the fancy styling of javascript technique.

This approach is less hassle to maintain: only the top level list needs a class and the javascript walks the DOM tree and adds the behaviours and styles rather have to class and sub class every tag in all of your sub-sub-sub-menus.

I prefer to use these with tags. It's what they're meant for right?

http://www.kryogenix.org/code/browser/aqlists/