Tutorial :dojo.require issues



Question:

I'm having trouble configuring my initial installation of dojo to include the widget framework correctly.

Following most of the code I see, including dijit should look like this:

dojo.require("dijit");  

and that's that. Unfortunately, that doesn't seem to work.

Using this initializes the widgets correctly, but there's some weird behavior from the standard dijit methods that makes me think that I'm doing it wrong:

dojo.require("dijit.dijit");  

Is there an element of configuring dojo that I'm missing? The files are all placed as they are in the 1.2.3 distribution, underneath another javascript folder.


Solution:1

You don't actually have to include dijit, just point directly to widgets you want to use: dojo.require("dijit.Dialog");. Weird widget behavior could be explained also by:

  • missing theme css files: check with FireBug that everything gets loaded
  • missing theme class attribute: add class="tundra" to the body element
  • missing djConfig="parseOnLoad: true"

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »