Category Archives: JavaScript
enterval, an automatic setInterval chainer.
Hello internet. Today we’ll be exploring the magical wonders of setInterval. Have you ever worked on a project that needed multiple timers going simultaneously? Have you ever wanted to bind all of those timer callbacks into just one timer without restructuring your code manually? Well, being the Curious George that I am, I wanted to [...]
Posted in JavaScript Tagged Timers
Problems with Looping through window.setInterval
Look at this code. What do you expect to be the outcome?
Also posted in Web Browsers Tagged Firefox, Timers
Speed up Including Google Analytics
Have you ever noticed that your homepage hangs when including the Google Analytics JavaScript file? I think a few people have noticed a delay. Well, let’s try something different. Let’s create the script node dynamically using DOM methods and put a timeout on this creation so that it inserts just enough delay so that your [...]
Posted in JavaScript Tagged Google Analytics, Timers
Forward Compatibility and JavaScript
Many developers (myself included) complain endlessly about the problematic ECMAScript implementation that Internet Explorer uses called JScript. And after reading one such very detailed complaint in the comments on Dave Massy’s website at MSDN, and reading Chris Wilson’s post about ECMAScript 3, it has become increasingly obvious of Microsoft’s opinion on the subject of Forward [...]
Also posted in Web Browsers Tagged Internet Explorer, Rendering Modes
Nursery Rhyme Code Poem [JavaScript]
(function() { function BlindMouse() {} BlindMouse.prototype.tail = true; BlindMouse.prototype.run = function(after) {}; function Mice(mouse1, mouse2, mouse3) { this.mice = []; this.mice.push(mouse1, mouse2, mouse3); this.declare = function() { return this.mice.length + ' Blind Mice'; }; this.run = function(after) { for(var j=0,k=this.mice.length;j<k ;j++) { this.mice[j].run(after); } }; this.cutOff = function(prop, weapon) { for(var j=0,k=this.mice.length;j<k;j++) { this.mice[j][prop] [...]
Also posted in Artistic Tagged Code Poem, Nursery Rhymes
Write More Efficient Javascript in YUI with CSS Selectors
This is an updated version of a previous article entitled Using DOM Query Libraries in YUI for the new version of YAHOO.util.Dom included with YUI 2.3.0 as well as including support for passing context nodes into Dom functions. Here we are again. I just love those CSS Selectors. If you haven’t read Part One of [...]
Posted in JavaScript Tagged CSS Selectors, DOM, ExtJS, YUI
Cross Domain XHR with Firefox 2
By now know you know that trying to do an XMLHttpRequest (XHR or AJAX) call to a domain that is different from the domain of the hosted JavaScript in Firefox will throw an exception. Error: uncaught exception: Permission denied to call method XMLHttpRequest.open If you don’t want a history of the past solutions, page down [...]
Also posted in Web Browsers Tagged Ajax, Firefox


Faster YUI DataTable with 5 Lines of Code