Archive for June, 2008

Read more

Making Browser Sense … dojo.isBrowser?

Every now and then, you’re going to run into a problem with a particular browser (I’m sure you know what I’m talking about), and so you need your JavaScript to adjust accordingly. Browser detection is the answer and here’s a short cookie on how you can do it using Dojo. Read the rest of this entry »

Read more

Extending dojo.dnd with a creator function

Following the Dojo philosophy of “build with, not on”, dojo.dnd provides a terrific API for getting the right behaviour for your app, with plenty of extension points and monkeypatching opportunities. Making a creator function for dojo.dnd.Container is the most obvious way to customize dojo.dnd, because it gets called anytime a container or avatar wants to visualize a data item.

Read the rest of this entry »

Read more

Separating Content from Presentation the Dojo Way

One of the cool things about Dojo is the dojo.xhrGet() function. It’s powerful because it makes transparent the browser dependent transports that make AJAX possible. In this cookie, we’re going to explore a simple use case in Dojo to separate content from the presentation of a page. This means that if you want to update some content of a specific portion of a page, you may not want to require the user to ‘refresh’ the entire page to see the new content. Read the rest of this entry »

Read more

Dojo Build 401: End Results

In this, the shortest build screencast ever, we inspect the overall results of the build project once placed on an properly configured server (mod_deflate). Nothing particularly exciting to be learned here, other than seeing the end result of 250k whittled down to a bite size hunk of (cache-able) JavaScript.

Read the rest of this entry »

Read more

Why doesn’t myTitlePane.title = “work” ?

Newcomers to dijit often instantiate a widget and wonder why “normal” dom getter/setters don’t work to adjust the properties. There is a perfectly valid reason for this, so lets inspect.

For example, a Markup declaration of a dijit.TitlePane:

Read the rest of this entry »