I just pulled the document from the old Dojo book and put it in the new doc system:
http://docs.dojocampus.org/multiversion/index
In your specific example, the djConfig object must be declared in the script tag before the Dojo file is loaded, and it is also recommended to match dijit and dojox:
<html>
<head>
<script>
var djConfig = {
scopeMap: [
['dojo', 'newns'],
['dijit', 'newnsw'],
['dojox', 'newnsx']
]
}
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"></script>
<script>
newns.addOnLoad(function(){
console.debug("hello world");
});
</script>
</head>
<body>
</body>
</html>
source
share