Archive for the ‘Club AJAX Google Code’ Category

JavaScript Console Fix V2 Now with iOS!

Monday, September 13th, 2010

The consoleFix.js has been a popular script, helping people overcome problems in the various browsers, but now, there are more features including support for your iPhone.  consoleFix is a small JavaScript file that removes the annoyances of cross browser logging. The use of console.log is now a standard used by not only Firebug, but WebKit Inspector and Internet Explorer Developer Tools. Firebug is ubiquitous with front end web development, and while it provides dozens of tools like DOM inspection and network sniffing, the logger gets the vast majority of use.

While log, warn, and info may be standard, using the groupCollapsed method will throw an error in Chrome, and the seemingly innocuous debug will throw an error in IE. Opera’s Dragonfly is an improvement over it’s anemic predecessor, but it still rivals IE’s feeble text-only logger and thus, only supports a small subset of console methods.

(more…)

Plain Text vs innerText vs textContent

Wednesday, September 1st, 2010

innerText and textContent are properties that get or set the text of an element or all its children. Internet Explorer implemented innerText in version 4.0, and it’s a useful, if misunderstood feature. WebKit also has innerText, carefully copying from, and even improving upon IE; and additionally has the standards compliant textContent, which we shall see, is no where near as useful and is in fact quite different. Firefox has textContent but not innerText, and a common mistake is writing code that retrieves one or the other, assuming the result will be the same (it’s not). Opera has the property, but it is little more than an alias of textContent, which to me is analogous to false advertising.
(more…)

Mock Data Randomizer

Wednesday, May 12th, 2010


A common step in the development cycle is to substitute fake data until real data is created, generated, or the API is set up to retrieve it. Creating this fake data isn’t usually difficult, but it can be a tedious and repetitive task. Club AJAX has added a new library item to create mock data for use in application development. Using the Club AJAX Randomizer, you can easily generate random numbers, booleans, colors, dates, characters, words, sentences, titles, names, and even website names. Helper functions are also available to scramble or return random elements from your own data.
(more…)

Fixing the JavaScript Console

Monday, April 19th, 2010


Firebug, the massively successful Firefox addon is an awesome development tool, but it’s not perfect. Carelessness in using it can lead to irritating and even embarrasing errors. And the console built into Internet Explorer 8? It’s great that web developers finally have something to help us develop on IE, but it is still pretty lame. When you consider working with both of them both together, you have even more problems. In general, it’s very undesirable to have debugging code cause bugs. Fortunately, there’s a very simple way of virtually eliminating these debugging errors.

(more…)