I have web application built on JSP, with dojo included on each page it is used (almost every page).
If during browsing i am not waiting for pages to fully load and navigate to another one,
dojo throws a java script exception
"Error: dojo.body() is null or not an object"
As far as i understand dojo thinks it is loaded but navigating to another page spoils it's plannes.
this function throws this
onload: function(){
// summary:
// Function that detects if we are in high-contrast mode or not,
// and sets up a timer to periodically confirm the value.
// figure out the background-image style property
// and apply that to the image.src property.
// description:
// This must be a named function and not an anonymous
// function, so that the widget parsing code can make sure it
// registers its onload function after this function.
// DO NOT USE "this" within this function.
// create div for testing if high contrast mode is on or images are turned off
var div = document.createElement("div");
div.id = "a11yTestNode";
div.style.cssText = 'border: 1px solid;'
+ 'border-color:red green;'
+ 'position: absolute;'
+ 'height: 5px;'
+ 'top: -999px;'
+ 'background-image: url("' + dojo.moduleUrl("dijit", "form/templates/blank.gif") + '");';
dojo.body().appendChild(div); // at this lineonload is called from here
dojo.loaded = function(){
// summary:
// signal fired when initial environment and package loading is
// complete. You may use dojo.addOnLoad() or dojo.connect() to
// this method in order to handle initialization tasks that
// require the environment to be initialized. In a browser host,
// declarative widgets will be constructed when this function
// finishes runing.
this._loadNotifying = true;
this._postLoad = true;
var mll = this._loaders;
//Clear listeners so new ones can be added
//For other xdomain package loads after the initial load.
this._loaders = [];
for(var x=0; x
Thanks in advance
What browsers and browser
What browsers and browser versions does this happen in? It might be nice to get a simplified test case. Feel free to file a bug at http://trac.dojotoolkit.org (use guest/guest login). You can upload test case files to the ticket.
I am using ie 7.
I am using ie 7.
Another information that might be useful is that this web application is using framsets and iframes while the dojo runs in them. I have seen an open ticket concerning hidden iframes ( Ticket #5197 ), it seems that we have few things in common
Can anyone open ticket for
Can anyone open ticket for this issue ?
Apparently I can't create user with right permissions on http://trac.dojotoolkit.org
thnx
You can use the "guest"
You can use the "guest" login account to create a ticket, (pw is guest). Also be sure to attach a test case.
Error: Could not load 'dojo.parser'; last tried '__package__.js'
Can anyone tell me how to remove this error ...
I got this error while downloading dojo module for drupal.
Complete Error is ----
1. Could not load 'dojo.parser'; last tried '__package__.js'
[Break on this error] throw _13||Error(_12);
dojo.js (line 94)
2. dojo.addClass is not a function
Something seems odd -- error
Something seems odd -- error #1 seems like an error from Dojo 0.4 (or a pre-0.9 version) but error #2 is a function in Dojo 1.0.
You have to call dojo.body() in the addOnLoad function
dojo.addOnLoad(function() {
var button1 = new dijit.form.Button({label: "hello world"});
dojo.body().appendChild(button1.domNode);
});