Dojo Tutorials

  • Dojo Workshops in San Jose AND dojo.beer()

    4/29/2011: I've added information about the dojo.beer() event.

  • Better onChange with Dijit’s intermediateChanges

    One of the things I love about Dojo's UI framework, Dijit, is that its widgets provide loads of functionality within one property that would take a bit of Javascript jousting to create on its own.  One of those widget properties is intermediateChanges.  intermediateChanges is a boolean property of dijit.form.* widgets (TextBox, ComboBox, etc.) that fires the onChange event whenever the value of the TextBox or other form widget changes.  Not the typical onChange event which only fires when the field is blurred — the event fires on each keystroke which changes value within the widget.

  • Creating Mobile Web Applications with dojox.mobile

    I recently was asked to study the Dojo Toolkit's budding mobile solution, dojox.mobile, and create a basic web application using the tools provided.  I hadn't heard of dojox.mobile before but was very excited at the prospect of becoming a skilled mobile developer and maybe even commit patches or new features/widgets for dojox.mobile.

  • Create a Clearable TextBox with the Dojo Toolkit

    4/18/2011: ClearTextBox has been updated to hide the clear icon when the value is empty. ClearTextBox has also been updated to use this.connect instead of dojo.connect for code efficiency reasons described by Chris Barber within the comments below.

  • Validate Credit Cards with JavaScript

    We all know that JavaScript shouldn't be a web form's only method of validation but client side validation does prevent unnecessary server side processing when user input is obviously invalid.  I'd also consider client side form validation a usability booster (...or nightmare when done poorly.)  I often hear developers complain about how difficult validating credit cards can be, especially when only supporting specific credit cards.  Luckily the Dojo Toolkit includes dojox.validate.creditCard, a resource capable of efficiently validating a credit card.  Better yet, you can easily take its logic and create you own validator.

  • Event Delegation with MooTools, Dojo, and jQuery

    I've covered the ins and outs of event delegation within JavaScript a few weeks ago but most developers utilize JavaScript frameworks so I thought I'd take a few moments to show you how to implement this wonderful event strategy with the MooTools, Dojo, and jQuery JavaScript frameworks.

  • Create a Dojo Lightbox with dojox.image.Lightbox

    One of the reasons I love the Dojo Toolkit is that it seems to have everything.  No scouring for a plugin from this site and then another plugin from that site to build my application.  Buried within the expansive dojox namespace of Dojo is dojox.image.  dojox.image is host to many common UI plugins, the most popular being dojox.image.Lightbox, a great solution if you're looking to create a reliable, elegant Lightbox with Dojo.  Let me show you how use dojox.image.Lightbox in your next web application!

  • Dojo Toolkit API Bookmarklet

    You probably know by know that I enjoy using JavaScript-powered bookmarklets to retrieve information.  I create a jQuery documentation bookmarklet, a MooTools class sniffer bookmarklet, and a  even a bookmarklet to allow you to submit articles to Script & Style.  I work extensively with Dojo on a day to day basis so I end up needing to review documentation often.  I got tired of using the API's search methods and instead chose to create a bookmarklet to get quick access to what I want.

  • JSONP with jQuery, MooTools, and Dojo

    We all know that the big limitation of AJAX is that cross-domain requests aren't allowed.  We also know, however, that we skirt around that rule a bit by using JSONP.  JSONP is the process of SCRIPT tag injection, referencing a cross-domain URL and providing a callback function (on your page) that the provider will call so that you can handle the result.  Let's take a look at how JSONP is handled with jQuery, MooTools, and the Dojo Toolkit.  For our examples, we'll pull tweets from Twitter with the term "Arsenal" in them.

  • Dive Into Dojo Series: Dive Into Dojo GFX

    I just wanted to give everyone a heads up about my latest Dive Into Dojo post: Dive Into Dojo GFX!