Keep Coding Tidy: Maintaining a tidy DOM for the future.

Posted by Dan Eastwell Fri, 23 Mar 2007 16:58:00 GMT

In the beginning… we littered our code with <td>s <font>s, whatever. Now, through scripting, we’re doing exactly the same thing, and not caring about it.

Read more...

Posted in , , ,  | Tags , , , , , , ,  | 2 comments | no trackbacks

JQuery: Journeys in Javascript and the DOM

Posted by Dan Eastwell Sat, 25 Nov 2006 11:02:00 GMT

I've been fiddling around with JQuery this week as part of my work. I've found it a very useful tool. To my dissapointment, I wasn't able to make Jay Gooby's Sussex Geek Dinner talk on JQuery. I've heard it was well-delivered and explicatory. I hope the slides will go up online soon

What is JQuery?

Essentially, JQuery is a very small javascript file, that allows you to write other javascript files in a much simpler language. You include the jquey.js file in all your HTML projects

It's a library of functions written in javascript that create, in essence a new language, that make coding javascript easier.

You include the JQuery file in the head of your HTML doc, plus your .js files written in JQuery.

What it will do for you is end the need for you creating exception handling, code looping through the DOM looking for classes and has some inbuilt functions that you can abuse like so many first-time photoshop users with nifty filters.

My concern is that learning this without learning why you need it will lead to poorer front-end developers. Equally, even front-end devs should learn how the underlying machine works, to understand what function to choose to lessen the burden on client machines.

Posted in ,  | Tags , , ,  | no comments | no trackbacks

Journeys in Javascript and the DOM: textarea max length

Posted by Dan Eastwell Tue, 31 Oct 2006 16:28:00 GMT

This article describes how to create a textarea max length indicator that keeps a countdown of the number of characters you have left to type. It also stops input after the maximum number of characters has been reached. It will truncate characters after the maximum limit via copy and paste, either from the right-click dialogue, or from the browser menu.

Read more...

Posted in ,  | Tags , , , , ,  | 18 comments | no trackbacks

Journeys in Javascript and the DOM: Remote Scripting

Posted by Dan Eastwell Mon, 30 Oct 2006 13:12:00 GMT

A sub-selector selector

I would class myself as a Javascript and the DOM beginner, and have been called to use it recently in something of a baptism of fire. In what I'm hoping is a series of articles about my (re)discovery of javascript with help from the DOM, I'll expose what I find out, so you don't make the same mistakes I'm likely to! So as a caveat to this example, it shouldn't serve as a script you should use, as it could well do with improving, comments welcome.

More importantly, the script shown here is inaccessible to users without javascript, so should be taken as an academic example only.

Read more...

Posted in ,  | Tags , , ,  | no comments | no trackbacks