root / trunk / tests / io / test_BrowserIO.frag.html

Revision 7351, 0.9 kB (checked in by jburke, 23 months ago)

(merge from 0.4 branch) References #2366. Converting more tests to use dojo.addOnLoad()

  • Property svn:eol-style set to native
Line 
1<html>
2        <head>
3                <!--[if lt IE 5.5]>
4                <script language="JavaScript" type="text/javascript" src="http://burstproject.org/burst/fix_ecma.js"></script>
5                <![endif]-->
6                <script language="JavaScript" type="text/javascript">
7                        // Dojo configuration
8                        djConfig = {
9                                isDebug: true
10                        };
11                </script>
12                <script language="JavaScript" type="text/javascript" 
13                        src="../../dojo.js"></script>
14                <script language="JavaScript" type="text/javascript">
15                        dojo.require("dojo.io.*");
16
17                        dojo.addOnLoad(function(){
18                                dojo.io.bind({
19                                        url: "frag.xml",
20                                        mimetype: "text/xml",
21                                        load: function(type, xml, e) {
22                                                // add the HTML
23                                                var html = xml.getElementsByTagName("html").item(0);
24                                                document.body.innerHTML += html.firstChild.nodeValue;
25
26                                                // run the script
27                                                var script = xml.getElementsByTagName("script").item(0);
28                                                dj_eval(script.firstChild.nodeValue);
29                                        }
30                                });
31                        });
32                </script>
33        </head>
34        <body>
35                View Source
36        </body>
37</html>
Note: See TracBrowser for help on using the browser.