When I use import, for example
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.2.3/dojo/dojo.xd.js"
djConfig="parseOnLoad:true, isDebug: true"></script>
I get an error
dojox.data.CsvStore is not a constructor
for strings like
var stateStore = new dojox.data.CsvStore({url: "dojo-passcsv.php", label: "name"});
but the error disappears if I use import from a local dojo installation, for example
<script type="text/javascript" src="dojo-release-1.2.3/dojo/dojo.js"
djConfig="parseOnLoad:true, isDebug: true"></script>
I would really like to be able to use the installed dojo CDN installation. Is there a known issue between the DojoX and dojo.xd.js libraries?
Thanks in advance,
Animesh
PS Ads dojo.require("dojox.data.CsvStore");
are in place.
PPS The following is the complete "working code". Replacing CSS and JS links with those from the CDN breaks it.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
@import "dojo-release-1.2.3/dijit/themes/tundra/tundra.css";
@import "dojo-release-1.2.3/dojo/resources/dojo.css"
</style>
<script type="text/javascript" src="dojo-release-1.2.3/dojo/dojo.js"
djConfig="parseOnLoad:true, isDebug: true"></script>
<script>
dojo.require("dojox.data.CsvStore");
dojo.require("dijit.Tree");
dojo.require("dojo.parser");
</script>
<script type="text/javascript">
var stateStore = new dojox.data.CsvStore({url: "states.csv", label: "name"});
</script>
</head>
<body class="tundra">
<div dojoType="dijit.Tree" store="stateStore" labelAttr="name" label="States">
</div>
</body>
</html>
source
share