Web development

Google Chrome.. or GlaDOS? on 02 Sep 08 (2 comments)

I downloaded Google Chrome tonight. It’s the pretty! Only scary thing is something Joe noticed… how much the logo looks like GlaDOS from Portal. Remember that time I pretended to murder you?

Object oriented javascript slides and samples on 31 Aug 08 (2 comments)

In 2008 I did a talk at a .NET user group in Oxford about the nuts and bolts of how objects actually work in javascript. Here are the presentation slides and code samples.

function-operator Javascript anonymous functions on 23 Aug 08 (46 comments)

Anonymous functions are functions that are dynamically declared at runtime. They’re called anonymous functions because they aren’t given a name in the same way as normal functions.

Functions are first class objects in javascript on 19 Aug 08 (15 comments)

Functions in javascript are first class objects. This means that javascript functions are just a special type of object that can do all the things that regular objects can do. Really, just like any other variable Here are a few of the important objects things that you can do with a function in javascript. A […]

Building simple objects on 17 Aug 08 (5 comments)

Javascript objects are basically just hash tables, a group of related properties and functions that can be accessed by a key. Properties are dynamically added at runtime. Methods are just properties that happen to be functions. Building a simple object The simplest way to build objects in Javascript is by declaring a new variable of […]

rufus How javascript objects work on (9 comments)

A look at the features of the javascript that can be used to write object oriented code and how javascript objects really work at the language level. Useful for people writing bare metal javascript or to understand how you framework really works.

IETester: test IE5.5 to IE8 on the same computer on 07 Aug 08 (Add comment)

My favourite new webdev tool of the moment is IETester. You can use it to test pages in IE5.5, IE6, IE7 and IE8 all on the same machine without messing around with your main installed version of IE. I was pretty amazed when I saw it because I’d always believed that it was a bit […]

Form layout using negative margins on 27 Jul 08 (1 comment)

Use negative margins and light weight semantic markup to display a form with the labels on one side and form elements on the other. No tables or divs needed at all. Works in all browsers. Noone who wasn’t a web developer would believe what a pain it is finding a good solution to this little problem.

The bleeding edge of web: media queries on 18 Jul 08 (5 comments)

Media queries are extra params for the CSS @media types that you can use to target styles for different devices based the device’s capabilities like dimensions and colour depth. They are part of the W3C CSS3 standard and are supported in the latest vesion of Opera (desktop and mini versions), Firefox and Safari. Media queries […]

Using the javascript querySelector() method to find DOM elements on 12 Jul 08 (Add comment)

The document.querySelector javascript method queries a HTML document for DOM elements that match a CSS selector. It is built-in browser support for the selector query features that made javascript libraries like JQuery so popular. It is part of the W3C selectors api spec. This feature has excellent support in recent versions of all desktop browsers, […]

Del.icio.us: not responsible for the cancellation of Stargate on 07 Jul 08 (Add comment)

The FAQ on del.icio.us made me laugh: (I wonder if they could do something about the new X-Files movie next…?)

Debugging pages in Safari on 05 Jul 08 (Add comment)

I’m getting quite interested in Safari because it seems to be where a lot of the early implementations of interesting new standards is happening. It makes me happy to get a little glimpse at what the future of web development might look like. :) The problem is Firefox has really spoilt me with all it’s […]

Switching opera desktop to hand held mode for testing on 11 May 08 (1 comment)

Neat little tip I found (in my old, old blog archives) is that you can switch Opera into hand held emulation mode by hitting Shift+F11. It’ll take your site and serialize the design to fit on a small screen like on your phone: It also will honour the @media handheld stylesheet so it’s a convenient […]

Firefox mouse gestures on 02 May 08 (3 comments)

One of the guys at work inspired me to try a mouse gestures plugins for Firefox today. For the uninitiated, mouse gestures are like keyboard shortcuts for the mouse. Instead of holding ctrl+c, you do a little drawing on the screen while holding down the right mouse button to make something happen. For example when […]

JSAN open source code repository on (Add comment)

Learnt something new today! There’s a repository of open source javascript code called JSAN modelled on the perl version. There’s a whole lot of interesting stuff on there like UI widgets, animations and AJAX. I haven’t tried any but it’s nice to know there’s somewhere you can see what other people are doing.

Objects, event handlers and "this" in javascript on 26 Apr 08 (9 comments)

One recurring problem I’ve had when using a function from a custom javascript object as an event handler is that when the event handler is called the “this” property of the function no longer references the object it originally belonged to. To show you what I mean, take a look at this simple javascript object. […]

First impressions of gmail – maybe the end of desktop mail for me on 24 Apr 08 (3 comments)

Today I found out that gmail supports checking and storing POP3 mail and it made me wonder if I even need a desktop email client any more. It has everything I use in Thunderbird (sorting, filtering, searching, address book) with the big advantage of being on the network and therefore accessible from any computer. So […]

Focus event handler run in different order in IE than Firefox on 16 Jan 08 (4 comments)

I wanted to document a bit of an edge case browser incompatibility that I found: that event handlers aren’t always run in the same order in IE as they do in other browsers. It’s a bit of a strange case where we were doing something not entirely sensible. :) There was an input box which […]

Firefox crash recovery: I am in love on 14 Oct 07 (Add comment)

Ok, I’m now officially in love with Firefox. My Vista install has mysteriously become flaky recently and is randomly taking down programs. When Firefox crashed, not only did it remember which tabs I had open, it also remembered the contents of what was in the form that I was filling in at the time of […]

Extreme nesting experiment in IE and Firefox on 04 Aug 07 (2 comments)

On the ever interesting topic of curiosity over good sense, I had an interesting discussion about how far you can nest HTML tables in different browsers. The person I was talking to had noticed that at a certain point the tables just stopped displaying when they tried to take their web rendering to an extreme […]

Internet hype technology of the week: Silverlight on 19 May 07 (Add comment)

Microsoft is amazing. WPF/E has been around for ages. They give it a fancy name and run a keynote about it at MIX and suddenly it’s the biggest thing to hit (Microsoft) web development since someone came up with a catchy name for ajax. This week it seems like its the only thing that anyone […]

IE bug logging database not being reopened on 13 May 07 (Add comment)

I was a bit disappointed when I read that public IE bug database isn’t being reopened. The reason given was that the volume of unusable bug reports submitted far outweighed the useful stuff. Apparently some people used it to tell the team how much they hate IE. :) I can understand that being a problem […]

Spanning javascript strings across multiple lines on (3 comments)

I came across a weird feature of javascript last week, a way of spanning javascript strings over multiple lines. To do it you put a ‘\’ character just before the line break and javascript knows it should keep going on the next line: var mystring = "hello \               […]

firebug-stack-trace DIY javascript stack trace on 12 May 07 (12 comments)

How to use arguments.callee to walk up the javascript call stack when you’re doing something that a debugger can’t help you with.

Interesting side affect of creating DOM objects using innerHTML on 15 Mar 07 (Add comment)

It’s ER night again tonight so I’m going to update with a totally dorky technical web thing I did today that I thought was interesting. :) I found a strange IE behaviour today in a sample I was looking at. The problem was with a javascript object that had a reference to a DOM object. […]