1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>Testing dojo.addOnLoad() and dojo.addOnUnload()</title>
6 <script type="text/javascript"
7 src="../../../dojo.js" djConfig="isDebug: true"></script>
8 <script type="text/javascript">
9 dojo.addOnLoad(function(){
10 console.debug("addOnLoad(func) works");
13 named: function(){ console.debug("addOnLoad(obj, name) works"); },
14 refd: function(){ console.debug("addOnLoad(obj, func) works"); }
16 dojo.addOnLoad(scope, "named");
17 dojo.addOnLoad(scope, scope.refd);
18 // dojo.addOnLoad(scope, "named");
19 // dojo.addOnLoad(scope, scope.refd);
21 dojo.addOnUnload(function(){
22 alert("addOnUnload works");
27 <h1>Testing dojo.addOnLoad() and dojo.addOnUnload()</h1>
29 <p>This page has registers a function with dojo.addOnLoad() and dojo.addOnUnload.</p>
31 <p><b>dojo.addOnLoad()</b>: You should see an alert with the page first loads ("addOnLoad works").</p>
33 <p><b>dojo.addOnUnload()</b>: You should see an alert if the page is reloaded, or if you navigate to a
34 different web page ("addOnUnload works").