2150 |
mathias |
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>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 |
alert("addOnLoad works");
|
|
|
11 |
});
|
|
|
12 |
dojo.addOnUnload(function(){
|
|
|
13 |
alert("addOnUnload works");
|
|
|
14 |
});
|
|
|
15 |
</script>
|
|
|
16 |
</head>
|
|
|
17 |
<body>
|
|
|
18 |
<h1>Testing dojo.addOnLoad() and dojo.addOnUnload()</h1>
|
|
|
19 |
|
|
|
20 |
<p>This page has registers a function with dojo.addOnLoad() and dojo.addOnUnload.</p>
|
|
|
21 |
|
|
|
22 |
<p><b>dojo.addOnLoad()</b>: You should see an alert with the page first loads ("addOnLoad works").</p>
|
|
|
23 |
|
|
|
24 |
<p><b>dojo.addOnUnload()</b>: You should see an alert if the page is reloaded, or if you navigate to a
|
|
|
25 |
different web page ("addOnUnload works").
|
|
|
26 |
</body>
|
|
|
27 |
</html>
|
|
|
28 |
|