Keep Coding Tidy: Maintaining a tidy DOM for the future.
Posted by Dan Eastwell

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.
Posted by Dan Eastwell

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.
Posted by Dan Eastwell
What do you do if you want to semantically indicate to clever user agents that your link goes to an external site? You use rel="external".
What do you do if you’ve also got a window that pops up, for example, terms & conditions when clicked on?
The pop up window is fairly obtrusive and moves away focus: what you need is a way of presenting this information non-modally, so that focus is not pulled from the activity at hand?
Read more...Posted by Dan Eastwell
Seeing as my site's called The Thought Balloon and I write a lot about CSS, Javascript and HTML, I get a lot of search engine queries for people looking for a 'CSS balloon' or a 'javascript balloon'.
Read more...Posted by Dan Eastwell
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
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 by Dan Eastwell
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 by Dan Eastwell
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...