We are very new to Dojo, and have put out our first semi-production release. The pages were loading very slow, like 1 min for a relatively simple page, and we realized we should probably use the WebBuilder to help us. So, we loaded our page in to the WebBuilder’s Auto-Analyse tab, and it seemed to pick modules perfectly. Then we built our optimized dojo.js file, and linked to it rather than the previous one at the google APIs location.
This must be where we are lost.
First, if we keep our dojo.require(“dojo.parser”) code in there, we get a javascript error saying that it could not load “dojo.parser”.
So, we removed all the dojo.require’s, thinking that our new dojo.js contains everything we need. However, if we do that, we get an error saying “dojo.byId is not a function”
How does one properly tie all this together after WebBuilder returns the dojo.js file?
as for dojo.require... you should never have to remove those...
Are you still including dojo.js in your pages? + your layer file?
-Karl Tiedt
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation
Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
It did not create a profile.js file. It didn't create a layer file, so
not sure what that is. I used the Simple Mode.
Go to: http://suntrust.moneymatch.com/mm/getGuide?guideID=6
This page has the original, un-optimized dojo references so you can see
what we did. Look at the source. We really don't need the Button and
ProgressBar, but I don't think that's the problem.
________________________________________________________
We are very new to Dojo, and have put out our first semi-production release. The pages were loading very slow, like 1 min for a relatively simple page, and we realized we should probably use the WebBuilder to help us. So, we loaded our page in to the WebBuilder’s Auto-Analyse tab, and it seemed to pick modules perfectly. Then we built our optimized dojo.js file, and linked to it rather than the previous one at the google APIs location.
I’ve been held up by an unrelated production issue… will get back to it soon
From: dojo-inter...@mail.dojotoolkit.org [mailto:dojo-inter...@mail.dojotoolkit.org] On Behalf Of James Thomas
Sent: Friday, May 27, 2011 12:50 PM
To: dojo-i...@mail.dojotoolkit.org
Subject: Re: [Dojo-interest] BIG TROUBLE - After WebBuilder dojo.byId isnotfound!
Sorry to hear you're having trouble Joseph, did you manage to get the problem fixed?
Sorry for not getting back quicker.
The simple mode doesn’t build a layer file…. So I switch to advanced, where it lets me do that, and I got both, the dojo.js, and I named my layer file dojoLayer.js.
I am certain the JS files are loading into the page correctly as I can see them correctly in the firebug source.
When I load the page, I see several errors about things not being found:
“Could not load ‘dojo._firebug.firebug’ – Just because I’m using firebug – no big deal I suspect
“dojo.declare is not a function”
“Could not load ‘dojo.parser’; last true ‘./parser.js’
This is the head of my page(“…” is for excerpts that don’t matter):
<head>
<title>…</title>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" />
<meta name="description" content="…" />
<meta name="keywords" content="…" />
<link rel="stylesheet"
href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"
media="screen"/>
<script
src="http://www.mysite.com/js/dojo.js"
data-dojo-config="isDebug: true, parseOnLoad: true">
</script>
<script
src="http://www.mysite.com/js/dojoLayer.js">
</script>
<script>
dojo.require("dojo.parser");
dojo.require("dojo.fx");
dojo.require("dojo.fx.easing");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.Tooltip");
dojo.require("dijit.Dialog");
dojo.require("dijit.form.ComboBox");
dojo.require("dijit.form.RadioButton");
dojo.require("dijit.form.Slider");
dojo.require("dijit.form.NumberSpinner");
dojo.ready(init);
function init() {
var pageContentDiv = dojo.byId("#bodyContainer");
fade("#bodyContainer", "in", 1000);
setTimeout("ieFadeIn()", 1000);
}
function fade(selector, direction, duration) {
var items = dojo.query(selector);
for (var i = 0; i < items.length; i++) {
if (direction == 'out')
dojo.fadeOut({ node: items[i], duration: duration }).play();
else
dojo.fadeIn({ node: items[i], duration: duration }).play();
}
}
function ieFadeIn() {
dojo.query('.startHidden').removeClass('startHidden');
}
</script>
</head>
-----Original Message-----
From: dojo-inter...@mail.dojotoolkit.org
[mailto:dojo-inter...@mail.dojotoolkit.org] On Behalf Of Karl
Tiedt
Sent: Friday, May 27, 2011 1:53 PM
To: dojo-i...@mail.dojotoolkit.org
Subject: Re: [Dojo-interest] BIG TROUBLE - After WebBuilder
dojo.byIdisnotfound!