1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>Multiversion Dojo: 0.4.3 and 1.0</title>
7 <link rel="stylesheet" type="text/css" href="../../../../resources/dojo.css" />
8 <link rel="stylesheet" type="text/css" href="../../../../../dijit/css/dijitTests.css" />
9 <link rel="stylesheet" type="text/css" href="../../../../../dijit/themes/tundra/tundra.css" />
11 <script type="text/javascript">
12 //djConfig for 0.4.3 setup.
17 <script type="text/javascript" src="http://o.aolcdn.com/dojo/0.4.3/dojo.js"></script>
19 <script type="text/javascript">
20 //Scope map for this page is "burned in" via a build command (see HTML notes below).
21 //Also, just adding properties instead of redefining djConfig, since that
22 //will wipe out djConfig values set up by the 0.4.3 dojo.
23 djConfig.parseOnLoad = true;
24 djConfig.baseUrl = "../../../../";
25 djConfig.useXDomain = true; //Technically this was set already in the 0.4.3 xd dojo.js file.
27 <script type="text/javascript" src="../../../../dojo.xd.js"></script>
28 <script type="text/javascript">
29 dojo.require("dojo.widget.DropdownDatePicker");
32 var xdPath = location.href;
33 var lastIndex = location.href.lastIndexOf("/");
34 xdPath = xdPath.substring(0, lastIndex + 1);
36 //Set up xdomain locations for dojo/dijit/dojox.
37 jodo.registerModulePath("dojo", xdPath + "../../../../../dojo");
38 jodo.registerModulePath("dijit", xdPath + "../../../../../dijit");
39 jodo.registerModulePath("dojox", xdPath + "../../../../../dojox");
41 //Notice that dijit._Calendar is required, not jidit._Calendar.
42 //Same for the dojo resources (not jodo resources).
43 jodo.require("dijit._Calendar");
44 jodo.require("dojo.date.locale");
45 jodo.require("dojo.parser"); // scan page for widgets
47 dojo.addOnLoad(function(){
48 dojo.byId("output043").innerHTML = dojo.version.toString();
50 jodo.addOnLoad(function(){
51 dojo.byId("output10").innerHTML = jodo.version.toString();
54 function myHandler(id,newValue){
55 console.debug("onChange for id = " + id + ", value: " + newValue);
60 <h1>XDomain Multiversion Dojo: 0.4.3 and 1.0</h1>
62 <p><b>NOTE: This test only works with a built, xdomain version of Dojo, and it must be built with the scopeMap parameter (the backslashes below are required):</b></p>
64 <p style="color: blue; background-color: yellow">build.sh profile=standard action=release scopeMap=[[\"dojo\",\"jodo\"],[\"dijit\",\"jidit\"],[\"dojox\",\"jodox\"]] xdDojoScopeName=jodo loader=xdomain</p>
66 <p><b>Only load this page from an http:// URL</b>. Otherwise, the xd loading will not happen.</p>
68 <p>This page xdomain loads Dojo 0.4.3 and Dojo 1.0 (under the jodo scope)</p>
70 <p>Dojo 0.4.3 version: <span id="output043"></span></p>
72 <p>Jodo version: <span id="output10"></span></p>
75 <input dojoType="dropdowndatepicker" value="2006-10-31" containerToggle="wipe" containerToggleDuration="300" >
79 <input id="calendar1" jodoType="dijit._Calendar" onChange="myHandler(this.id,arguments[0])">