Category Archives: javascript

JS: Execute JavaScript on Page Load

Recently I’ve been making an effort to improve my JavaScript skills, I’m not a JavaScript-Jedi yet but I have been picking up a few, tips, tricks and techniques.
One thing that I find extremely useful is using an init function to call other functions when the page has loaded. I have been using the nifty function [...]

JS: Unobtrusive Select All Checkboxes

I wrote last week about how I’m trying to improve my JavaScript skills. As a small exercise I have written this function for unobtrusively selecting/deselecting checkboxes in a form.
PLAIN TEXT
JAVASCRIPT:

function selectAll(box)

{

// get the elements name

var id = box.id;

var name = /^([a-z]+)(_select_all)$/i.exec(id);

 

name = name[1];

 

re = new RegExp('^'+name+'_[0-9]+$');

 

// get the elements stauts

var state = box.checked;

 

// get the [...]

My volatile relationship with Javascript

I started work in web development in 2004 at this point in time JavaScript was hugely unpopular in terms of web trends, this is probably because it was mostly used for annoying pop-ups, animations and whole list of other horrendous Internet crimes. I can recall having a King Herod style culling of all JavaScript from [...]

CSS tips and articles

I began teaching myself Cascading Style Sheets (CSS) in 2004 when I graduated from University and started work in website development. At the time it was difficult to find well written resources that thoroughly explained how various CSS techniques worked.
In the past few years, CSS adoption has increased dramatically. These days most high profile websites [...]

Curse you Internet Explorer!

I was pretty pleased with the code syntax highlighting plugin I installed yesterday, just before I was about to finish work I got the Blog up in IE6 Arrrggghhh! IE6 redenders the width of the main content column smaller than Firefox and IE7, this causes the main content to be displayed below the content [...]