1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>Testing afterOnLoad</title>
7 <link rel="stylesheet" type="text/css" href="../../../resources/dojo.css" />
8 <link rel="stylesheet" type="text/css" href="../../../../dijit/tests/css/dijitTests.css" />
9 <link rel="stylesheet" type="text/css" href="../../../../dijit/themes/tundra/tundra.css" />
11 <script type="text/javascript">
12 window.onload = function(){
13 //Create global djConfig object first. We cannot use the djConfig attribute
14 //on the script tag since it may not be visible in some browsers at the time
15 //dojo.js executes. This causes problems when the "require" property is used
16 //as part of djConfig. Also note that you have to set baseUrl directly, since
17 //it cannot be detected as part of script tag.
29 var script = document.createElement("script");
30 script.type = "text/javascript";
31 script.src = "../../../dojo.js";
33 document.getElementsByTagName("head")[0].appendChild(script);
36 function myHandler(id,newValue){
37 console.debug("onChange for id = " + id + ", value: " + newValue);
42 <h1>Testing afterOnLoad</h1>
44 <p><b>This page only works with a dojo build</b>. It will not work properly if you run it directly from the subversion source.</p>
46 <p>This page tests loading dojo after the page is loaded. </p>
48 <p>When the window.onload fires, the dojo script tag will be added to the DOM
49 and configured to fire the onload callbacks. If everything works, you should
50 see a Calendar below.</p>
53 <input id="calendar1" dojoType="dijit._Calendar" onChange="myHandler(this.id,arguments[0])">