Category Archives: javascript

console.log in Safari doesn’t “apply”. Bad Safari.

It’s not unusual to want to write a cross-browser logging function akin to Firebug’s console.log(). The approach that you would expect to work could quite plausibly be this:

function log() {
if(console) {
console.log.apply(this,arguments);
}
}

We invoke the function with apply here so that implementations that can take [...]

SproutCore: smart clients, dumb servers

I heard about SproutCore recently, from an enthusiastic client-side web developer. I hadn’t heard about it, which is not entirely unsurprising as it turns out - SproutCore came out of hiding as something of a surprise at the recent Apple Worldwide Developers Conference, as the power behind the slick interfaces for Apple’s new suite of [...]

Using Script tags to do remote HTTP calls in Javascript

I’ve been racking my brains all afternoon trying to find a workable solution to the problem of not being able to make remote HTTP calls using javascript. This is an issue for me because so much of my work takes place inside a TiddlyWiki which, when viewed locally (from a file:// url) is a perfect [...]

Too many cooks spoil the DOM (getting content out of page elements)

I frequently find myself wanting to refer to the contents of an element on a web page, having got hold of that element in the DOM. However, I equally frequently forget how to access this content.
The confusion arises because there are various ways to get hold of the content of an element: nodeValue, value, data, [...]

Editors, editors, everywhere and not a lot of links

Edit: I’ve updated the list of editors below after some good leads in the comments.
So… I’ve been pottering around the web looking for a decent development environment to free me from the shackles of Notepad, which I’ve been using without fail since about 1999. Yes, it’s tragic. I was looking for a tool to help [...]

Javascript frameworks - Ben Marvell

Ben works as a web developer at Wiley Publishers - he’s going to be doing a slightly unusual presentation about Javascript frameworks…