JavaScript Tutorials
Create a Simple News Scroller Using Dojo
My journey into Dojo JavaScript has been exciting and I'm continuing to learn more as I port MooTools scripts to Dojo. My latest experiment is porting a simple new scroller from MooTools to Dojo. The code is very similar! The HTML The news items...
Remove Broken Images Using Dojo
In an effort to get better with the Dojo Toolkit, I've decided to port yet another one of my previous posts: Remove Broken Images Using MooTools or jQuery. Broken images are an eyesore to any website so there's no point to keeping them...
Link Nudging Using Dojo
In the past we've tinkered with link nudging with MooTools and link nudging with jQuery. In an effort to familiarize myself with other JavaScript frameworks, we're going to try to duplicate that effect with another awesome framework: Dojo. The JavaScript: Attempt...
Downloadify: Client-Side File Generation Using JavaScript and Flash
The following tools is in its very beta stages and works intermittently. Its so damn useful that I had to show it off now though! I recently stumbled upon Downloadify, a client-side file generation tool based on JavaScript and Flash ActionScript code. A...
Test For Popup Blocker Using JavaScript
Several websites rely on the ever-so-annoying popup window. As much as well all hate popup windows, some websites do benefit and justly require them. The problem is that some people have their popup blocker on but don't know it -- thus the new window...
Limiting Variable Scope Using (function(){})();
Simply put, a scope limiter is a self-executing function that defines a variables, performs a task, and clears those variables so that their scope is limited to the function itself. Take the following JavaScript code, for example: Everything above works but the second task can "see"...
Access JavaScript Object Variable Properties
Not all JavaScript objects are as easy as MyObject.property. Sometimes you may want to access a property whose key is stored in a variable. Luckily accessing these properties is very easy. Javascript Object Property Accessing Example You may use array-style syntax to access an object's properties.
META Refresh vs. JavaScript Refresh
A few days back I was perusing the ESPN.com source code when I found the following snippet of code: I understand what the code was supposed to do but was confused as to why they'd use JavaScript as a primary method and META as a fallback method.
Code-Parsing Regular Expressions via Lighter.js
Perfecting a regular expression can take a lot of time and testing but once achieved can be a absolutely golden. While looking through the source code of MooTools syntax highlighter Lighter.js I stumbled upon a few code-parsing regular expressions that you might be interested...
Replace All Occurrences of a String in JavaScript
One thing you may have noticed is that JavaScript's String.replace() method doesn't act like replacement methods in other languages. Take the following for example: The above code will only replace the first occurrence of "MooTools" -- not every occurrence like PHP's str_replace() would. To replace every...