Archive for the 'Coding' Category

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 [...]

IE7, xmlhttprequest, and 1223 status code

I’m working on a program that is fairly Ajax heavy right now. Several of the JS routines need to call for XML from the server, and when there is no data to parse I’m sending a 204 header (no content) so that the JS can know there’s no data without having to parse the [...]

SQL_CALC_FOUND_ROWS - Is it faster?

Reading through a post on SQL_CALC_FOUND_ROWS actually being slower that running one query followed by a count query I decided I needed to do a little benchmarking on my own.

addthis_url = ‘http%3A%2F%2Fforumsblogswikis.com%2F2008%2F06%2F12%2Fsql_calc_found_rows-is-it-faster%2F’;
addthis_title = ‘SQL_CALC_FOUND_ROWS+-+Is+it+faster%3F’;
addthis_pub = ‘RyanNutt’;

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 [...]