Run Javascript Functions Without using \’domready\’ Event

I don\’t really like using the \’domready\’ event. The idea of adding another event to the window object just bugs me. So here\’s the alternative. In short, an array is created, functions you want to run are added to the array, and when the page reaches the bottom the functions in the array are run. Continue reading Run Javascript Functions Without using \’domready\’ Event

Don\’t Pollute the Global Space; Namespace It!

I like to namespace my code with object literals to contain all my functions and classes. It keeps things organized, decreases global space pollution from additional functions, and prevents conflicts with third-party scripts. It\’s very easy to extend too. Continue reading Don\’t Pollute the Global Space; Namespace It!

What I Learned About Multi-threading in JavaScript

There\’s no such thing. Correct me if I\’m wrong, but multi-threading in javascript does not exist. But we can simulate it, as is discussed by James Edwards. How does it work?

It all hinges on the use of asynchronous timers. When we run repetitive code inside an asynchronous timer, we’re giving the browser’s script interpreter time to process each iteration.

Continue reading What I Learned About Multi-threading in JavaScript

Form property set/get error with MooTools in Internet Explorer

When I was working on TV.com\’s redesign, I found an error when setting or getting a form element\’s properties in IE. The other browsers was able to set or get the property just fine. So I\’m going to share my solution with you today. I\’ll go over the methods MooTools has first so you know what I was doing. Continue reading Form property set/get error with MooTools in Internet Explorer

Inspired by Aaron Newton\’s \”Programming to the Pattern\”

Aaron Newton is a contrbutor to MooTools and the care-taker of Clientside, CNET.com\’s developer blog. He recently wrote about being inspired to write code differently and a more indepth post about his thoughts on (take a deep breath if you\’re verbally reading this) \”jQuery, MooTools, the Ajax Experience, Programming to the Pattern, and What Really Makes One Framework Different From Another\”. He has inspired me to be more aware of how I write my code. Continue reading Inspired by Aaron Newton\’s \”Programming to the Pattern\”