X
Business

Miraculous script.aculo.us

aka Old Dog, New TricksI have an admission to make. I don’t know any JavaScript.
Written by Jake Rayson Rayson, Contributor

aka Old Dog, New Tricks

I have an admission to make. I don’t know any JavaScript. Sure, I’ve plundered aplenty in the past, noodled with the creations of others and worked alongside very talented scripters. But I’ve never actually learnt how to code. See, I am what is known as a web builder – XHTML and CSS are the tools of my trade.

Until now. Until The Ministry wanted little boxes which hide the content when the heading is clicked. Enter script.aculo.us, a JavaScript library which is based upon a JavaScript framework called Prototype. Suffice to say, the object is to make it easy for non-coders to use the power of JavaScript and AJAX. Such as sliding boxes.

Of course, what you want is rarely what comes out of the box. The documentation for script.aculo.us isn’t the best in the world, however, I did come across a fairly useful tutorialby Tony Summerville, and a more comprehensive tutorial at the JavaRanch.

Next stop, drag 'n' drop jigsaw game ;)

Update: AAARRGH

The two tutorials referenced above don’t work in Internet Explorer 6. I thought it was my buffoonery but no, they never did work. So, I am looking at the 24 ways tutorial and Dustin Diaz's tutorial.

It’s a bit of a shame, as I really liked Tony Summerville’s use of the Behaviour library, which hooks JavaScript into CSS so that you can have far less JavaScript messing up your structurally sound HTML ;). However, I noticed that Ben Nolan doesn’t seem to be maintaining the library any more, so I found an alternative catchily named ‘JavaScript Behaviours’.

Obviously, I am not a coder but when I get this darned foldup effect working in IE6 with neat and tidy markup, I’ll post the results up here to share.

Editorial standards