SilverStripe.com Blog

Free Code: "Unobtrusive JavaScript" Tree Control

Posted by Sam on 30 October 2005

Here's a tree control that uses semantic HTML, unobtrusive JavaScript, and is easily reusable in a bundle of applications.

Here's the first of what will hopefully be a bunch of code that we donate to the web at large.  I made this a few months ago, but it's been serving me well.

There are a lot of tree controls out there, but most of them are tacky, heavyweight relics of the"DHTML" era.  I felt it was time for a change.  In particular, I wanted to adopt "unobtrusive javascript" techniques.  Among other things, the script has these notable features:

  • All of the styling is in a seperate CSS file.  The only thing that the JavaScript manipulates is class names.   This gives you a lot of control over the design relatively easily.
  • There is a no "set up code".  The script searches for <ul class="tree"> and applies its magic to that.
  • All of the content as loaded in a set of nested <ul>s - the simplest, code that I could think of that was semantically linked to heirachical data.


Go here for demo, instructions, and a bit of information about how I put it together.

If you've got comments, requests, suggestions, etc, email me on sam@silverstripe.com.

Read the full post

1 Comments Tags:

New Zealand E-Government Guidelines

Posted by Sam on 29 October 2005

at standards-schmandards.com

Peter Krantz has posted a summary of the NZ government's compliance with their new e-government guidlines. A few points have come out of this.

Read the full post

0 Comments Tags: ,

What I read: Minding the Planet

Posted by Sam on 28 October 2005

From time to time I showcase blogs that I like reading. These often have very little to do with content management and the web, but you might find them interesting.

Minding the Planet is a blog I read fairly regularly.  In addition to musings about the "semantic web", Nova, the author has plenty of really interesting posts out of left field.  It's a refeshing source of curious facts about the world with Nova's unique perspective.

What's the semantic web?  Well, maybe I should let Nova tell you.

 

Read the full post

0 Comments Tags:

A great perspective on Web 2.0

Posted by Sam on 26 October 2005

at headrush.typepad.com

Kathy Sierra knows what she's talking about. "Creating passionate users" is an excellent blog.

Read the full post

0 Comments Tags:

Why I switched to Google Reader

Posted by Sam on 26 October 2005

A brief review of Google's new RSS agregator.

So Google comes out with an RSS agregator and of course I give it a go.  Google really is the new Microsoft, except without the bitter aftertaste.  Maybe corporate america isn't all bad.   Maybe I just have a double standard ;-)

I've been using it for about a week now, not exactly a huge amount of research.  However, today I crossed a significant milestone:  I've delete my Bloglines bookmark and adopted Google Reader as my agregator of choice.  Why is this?

Read the full post

0 Comments Tags:

Looking for our Open Source Software? Then head to SilverStripe.org.

Comments on this website? Please give feedback.