Skip to content

ara pehlivanian

Web Standards, Web Culture, Web Everything.™

Archive for the 'JavaScript' Category

Introducing 140 char (or less) JavaScript programs

Today I got tired of seeing yet another onclick=”myjavascriptsucks()” in HTML so I wrote a little program in protest. What I wanted to do though was to post the program to Twitter which has a 140 character limit so it was mildly challenging. Here it is:
Fully expanded:
var elems = document.getElementsByTagName(”*”);
for (var i = 0; elems[i]; [...]

A Nuance of Preventing Default

One of the most common operations when assigning event handlers is to prevent the default action the event normally triggers.
In the case of an anchor for example, the click event of an anchor triggers the default behaviour of following the URI specified in the href attribute. So the browser’s default action when clicking the “Fluffy [...]

Have JavaScript, Will Travel

The technology of the web is maturing. However slowly and clumsily, it is maturing. The web of today looks nothing like the web of ten years ago. Most notable are the advent and widespread adoption of Web Standards, and more recently the mushrooming popularity of JavaScript due largely to Web 2.0 mania.
The trouble though, is [...]

Worry Free JavaScript Internationalization (i18n)

There’s a right way and a wrong way to go about i18n. Just to be clear, I don’t subscribe to the idea of right vs. wrong unless there’s a good reason for it, otherwise I just chalk it up to preference. Sometimes I consider something as a matter of preference until someone points out a [...]

On Event Throttling

Throttling the onresize event in IE.

Skip to navigation

More stuff by Ara elsewhere on the web

    Snook Approved!

    © 2005-2008, Ara Pehlivanian.

    Stock photography courtesy stock.xchng. This site uses Akismet to catch spam (54,743 caught since May 2006) is hosted by DreamHost and powered by WordPress.