Planet Bods and JavaScript.

Published on 20 July 2003 in , , ,

After what seems like months (or is it years?) of working on the thing, I uploaded the new look Planet Bods today.

Finally I have got rid of the nasty horrible table based layout that used to be there, and replaced it with a nice CSS based layout – the same method I’ve been using on other sites for at least 18 months, if not longer.

The new look will probably look slightly familiar when you compare it with this site, but not too similar I hope! And hey, once you’ve got a design that kinda works, why deviate from it too much? Let me know what you think, or any bug reports, by email please!

One bit I’m especially proud of is a bit of DOM based JavaScript that clears text boxes for you, and then restores them to the default text if you don’t type anything in.

Now those of you with JavaScript knowledge will no doubt be saying that it’s not particularly hard, but try doing it without adding onfocus attributes on every input tag in your HTML source code. There. That’s reduced the people saying it’s not hard!

Okay if you know about event handlers and the DOM, it’s not exactly hard, but I’m acting like an excitable child cos I’ve never done it before, and don’t understand the principles 200% either. It currently only works on input tags, but I’ll be adapting it to work on textareas when I’ve learnt enough – and once that’s done, I’ll add it on Bods Central so everyone can enjoy it!

But all this voyage of discovery of JavaScript is coming perhaps a bit too late as I won’t be able to make use of it in my professional career – maybe working out how to do something complex in Excel will give me the same joy! But somehow I doubt it!