| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
|---|
| 2 | "http://www.w3.org/TR/html4/strict.dtd"> |
|---|
| 3 | <html> |
|---|
| 4 | <head> |
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|---|
| 6 | <title>Test for Trac Ticket #5637</title> |
|---|
| 7 | <style type="text/css"> |
|---|
| 8 | @import "../dojo/resources/dojo.css"; |
|---|
| 9 | @import "../dijit/themes/tundra/tundra.css"; |
|---|
| 10 | |
|---|
| 11 | .layout { |
|---|
| 12 | width: 60%; |
|---|
| 13 | padding: 3px; |
|---|
| 14 | margin: 20px 0 0 5px; |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | div#debug { |
|---|
| 18 | border: 1px solid orange; |
|---|
| 19 | background: #ccc; |
|---|
| 20 | color: brown; |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | div#foo { |
|---|
| 24 | background: #eee; |
|---|
| 25 | border: 1px solid red; |
|---|
| 26 | } |
|---|
| 27 | </style> |
|---|
| 28 | <script type="text/javascript" src="../dojo/dojo.js" djConfig="parseOnLoad: true"></script> |
|---|
| 29 | <script type="text/javascript"> |
|---|
| 30 | dojo.require("dojox.layout.ContentPane"); |
|---|
| 31 | dojo.addOnLoad(function() { |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | window.name = "myWindow"; |
|---|
| 35 | debug("Set window.name to : " + window.name); |
|---|
| 36 | |
|---|
| 37 | var cp = dijit.byId("foo"); |
|---|
| 38 | cp.onLoad = function(e) { |
|---|
| 39 | debug("Done loading..."); |
|---|
| 40 | debug("window.name is now : " + window.name); |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | debug("Loading content into ContentPane..."); |
|---|
| 44 | cp.setContent("<h3>Dynamically loaded content...</h3>"); |
|---|
| 45 | }); |
|---|
| 46 | |
|---|
| 47 | function debug(message) { |
|---|
| 48 | dojo.byId("debug").innerHTML += message + "<br/>"; |
|---|
| 49 | } |
|---|
| 50 | </script> |
|---|
| 51 | </head> |
|---|
| 52 | <body class="tundra"> |
|---|
| 53 | <div id="foo" class="layout" dojoType="dojox.layout.ContentPane"> |
|---|
| 54 | <h3>Preloaded content...</h3> |
|---|
| 55 | </div> |
|---|
| 56 | <div id="debug" class="layout"> |
|---|
| 57 | <u>Debug :</u> <p/> |
|---|
| 58 | </div> |
|---|
| 59 | </body> |
|---|
| 60 | </html> |
|---|