Login Register

bootstrap

dojo.body() is undefined

I'm trying to create a ClassA, that is extended by ClassB. An instance of ClassB should be created onLoad.

However, the Firefox error console reports these two errors:

Error: dojo.body() is undefined
Source: /dojo/_base/_loader/bootstrap.js line 674
Error: ClassB is not defined
Source: test.html line 19

What does 'dojo.body() is undefined' actually imply?

Source:

File ClassA.js:

dojo.declare(/*Class name*/ "ClassA", /*Extend*/ null, {

initializer: function(domNode, resourceType, path) {

Add onLoad with *method* to djConfig

I'd love to see a new onLoadFunc property, or some similar name, in djConfig. This would allow a script to programmatically grab an xdomain version of dojo that automatically calls the specified function when it's loaded, getting around asynchronous loading issues.

For example, I have a bit of javascript I'd like to be loaded in a single call from third-party pages, and my script uses Dojo. To get around those sites having to include the Dojo script as well as mine in their HTML, I'd like to programmatically load it as in:

function onDojoLoad()
{

Loading Dojo after page load completes

I am trying to create a favelet that uses Dojo. In order to make it flexible, it needs to use a xdomain build and the entire Dojo framework will have to be loaded some time after the page loads (whenever the favelet bookmark is clicked). I haven't been able to get it to work with the AOL xdomain build, and the only similar thread I could find was this, which is several months old and didn't seem to get resolved.

Loading modules (drives me mad)

Hi everyone!

I have a Dojo application, client-side-only (i.e. no server). I want the following directory structure:

app.html <- this is the application's html file
styles   <- directory with CSS
scripts  <- directory with .js
  |
  -dojo  <- directory with dojo.js
  |
  -dijit
    |
    -layout
    |
    -etc

How do I setup this structure? I tried using dojo.registerModulePath, but with no success...

Thank you in advance!

Syndicate content