JavaScript Error ‘expected identifier, string or number’ in IE

Sometimes you get those errors that just pick at you and you can’t seem to find a solution. It happened to me this morning when testing a JavaScript library I’m writing in IE7. FireFox worked without a hitch, but IE threw an ‘expected identifier, string or number’ error pointing to the last line [...]

How to insert tabs in a textarea

I’ve always found it annoying that tabs don’t, well, tab in textareas on HTML pages. To be fair, they do what they’re supposed to and move on to the next field. But for a web app I’m working on I needed a way for the tab key to insert a tab.

addthis_url [...]

Why is middle the default vertical align for a table cell?

A little bit of a rant here. Why do HTML table cells default to vertically centering the text? I have never done a design that it looked right for the cells to be vertically aligned to the middle. It seems that top aligned would be the most commonly used and for those [...]

JSDoc - Docmentation for JavaScript files

I’ve finally dragged myself, kicking and screaming, into using phpDoc on my PHP files to keep my sanity. But I’ve always been very sparse on my JavaScript documentation. I’ve got what I thought was a good excuse though - those comments have to be downloaded to the visitors machine meaning more time before [...]

Generating element IDs with JavaScript and counters

The code that I posted in my previous post on creating a unique ID in JavaScript is fairly similar to code that’s all over the internet and seemed like it should work. And to be fair, it did work, although with one major problem. If the code runs too quickly it’s possible for [...]