]> git.pond.sub.org Git - eow/blob - static/dojo-release-1.1.1/dojo/tests/_base/_loader/scope/scopeSingleDaac.html
Comment class stub
[eow] / static / dojo-release-1.1.1 / dojo / tests / _base / _loader / scope / scopeSingleDaac.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2         "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4         <head>
5                 <title>Using scope names inside dojo.require/dojoType</title>
6
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" />
10                 
11                 <script type="text/javascript">
12                         //djConfig for 0.4.3 setup.
13                         djConfig = {
14                                 isDebug: true,
15                                 debugAtAllCosts: true,
16                                 parseOnLoad: true,
17                                 baseUrl: "../../../../",
18                                 scopeMap: [
19                                         ["dojo", "jodo"],
20                                         ["dijit", "jidit"],
21                                         ["dojox", "jodox"]                                      
22                                 ]
23                         };
24                 </script>
25
26                 <script type="text/javascript" src="../../../../dojo.js"></script>
27                 <script type="text/javascript">
28
29                         //Notice that dijit._Calendar is required, not jidit._Calendar.
30                         //Same for the dojo resources (not jodo resources).
31                         jodo.require("dijit._Calendar");
32                         jodo.require("dojo.date.locale");
33                         jodo.require("dojo.parser"); // scan page for widgets
34
35                         jodo.addOnLoad(function(){
36                                 jodo.byId("output10").innerHTML = jodo.version.toString();
37                         });
38
39                         function myHandler(id,newValue){
40                                 console.debug("onChange for id = " + id + ", value: " + newValue);
41                         }
42                         function foobar(){
43                                 jodo.byId("typeOut").innerHTML = "typeof dojo: " + (typeof dojo) +  "<br>typeof dijit: " + (typeof dijit) + "<br>typeof dojox: " + (typeof dojox);
44                         }
45                         setTimeout(foobar, 2000);
46                 </script>
47         </head>
48         <body>
49                 <h1>Using scope names inside dojo.require/dojoType</h1>
50         
51                 <p><b>NOTE: This test only works with a built version of Dojo.</b></p>
52
53                 <p>Jodo version: <span id="output10"></span></p>
54
55                 <p><b>typeof dojo, dijit and dojox should be object, since debugAtAllCosts is ON</b>: <br><span id="typeOut"></span></p>
56
57                 <p class="tundra">
58                         <input id="calendar1" jodoType="jidit._Calendar" onChange="myHandler(this.id,arguments[0])">
59                 </p>
60                 
61         </body>
62 </html>
63