Login Register

"Multiple Versions of Dojo" doc out-of-date

Following the instructions on http://dojotoolkit.org/book/book-dojo/part-3-javascript-programming-dojo... gets me nowhere. The test page displays the dropdown date picker, but not the calendar widget.

I tried it with local dojo, AOL-hosted dojo, various combinations of stuff baked into the 0.4.3, no luck in any combination (though the errors vary).

For the version like in the docs, in firebug console, I see the following errors:
parser.xd.js

window[typeof djConfig != "undefined" && djConfig.scopeMap && djConfig.scopeMap[0][1] || "dojo"]._xdResourceLoaded is not a function
window[(typeof (djConfig)!="undefined"&&...onCtr++;}nso[ret]=_35;return ret;};}}});

locale.xd.js

window[typeof djConfig != "undefined" && djConfig.scopeMap && djConfig.scopeMap[0][1] || "dojo"]._xdResourceLoaded is not a function
window[(typeof (djConfig)!="undefined"&&...);if(_79==_78){_7b++;}return _7b;};}}});
uncaught exception: Could not load cross-domain resources: dijit._Calendar dojo.date.locale dojo.parser

Original code:

<head>
<script type="text/javascript">
djConfig = {
    parseOnLoad: true,
    scopeMap: [
        ["dojo", "dojo11"],
        ["dijit", "dijit11"],
        ["dojox", "dojox11"]
    ]
}
</script>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.1.1/dojo/dojo.xd.js"></script>
<script type="text/javascript">
//Notice that djConfig is being redefined here.
djConfig = {
    isDebug: true
}
</script>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/0.4.3/dojo.js"></script>

<script type="text/javascript">
    dojo.require("dojo.widget.DropdownDatePicker");
    //Notice the require strings use "dojo" and "dijit"
    //instead of "dojo11" and "dijit11". However, the objects
    //will be used on the page by their "dojo11" and "dijit11"
    //names. For instance, you do a dojo11.require("dojo.string");,
    //but in this page you would call dojo11.string.trim().
    dojo11.require("dijit._Calendar");
    dojo11.require("dojo.date.locale");
    dojo11.require("dojo.parser"); // scan page for widgets
    dojo.addOnLoad(function(){
        //Do something with Dojo 0.4.3 in here.
    });
    dojo11.addOnLoad(function(){
        //Do something with Dojo 1.1 in here.
    });
</script>
</head>
</body>
    <input dojoType="dropdowndatepicker" value="2006-10-31" containerToggle="wipe" containerToggleDuration="300" >
    <p class="tundra">
        <input id="calendar1" dojo11Type="dijit11._Calendar">
</body>