Smarty Debug with Firebug
I use Smarty, a template engine, at work. One of the most awesome things about it is the debug window, where it can list all the templates being used and variables that are available. Mike Horn shared with me how a user, named Hipska, created a Smarty debug template file that works with Firebug. I [...]
Sly, New Selector Engine & How to Use in MooTools
You’ve heard of selector engines right? The engine that parses the HTML to match a string argument to return matching HTML elements? How about Sizzle and Peppy (two fast selector engines) that was released? Or how a couple JS frameworks were implementing Sizzle and the MooTools dev team decided not to follow suit? Now, have [...]
Solution to Flash and Select Drop-downs Covering HTML Elements
I’ve positioned elements absolutely and had to deal with a bug where the element appears below a flash object or select drop-downs, which usually occurs in IE. I’ve seen a few solutions, which work great, and I have one more to add.
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.
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.
Get Around Form submit() Mapping
If you’ve had to use javascript to submit a form, you may have used the forms submit() method. You may also experienced difficulty, such as a “submit is not a function” error. It has to deal with mapping and I’ve got a very simple solution.
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 [...]
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 [...]
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 [...]