Debian Codegraph @

dojox/io/proxy/tests/xip.html

raw symbols SCIP
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>XHR IFrame Proxy Tests</title>
6 <style type="text/css">
7 @import "../../../../dojo/resources/dojo.css";
8 @import "../../../../dijit/themes/tundra/tundra.css";
9 @import "../../../../dijit/themes/dijit.css";
10 </style>
11
12 <script type="text/javascript" src="../../../../dojo/dojo.js"
13 data-dojo-config="isDebug:true"></script>
14 <script type="text/javascript">
15 var testXmlGet;
16 require(['dojo/_base/kernel', 'dojox/io/proxy/xip', 'dojo/_base/xhr', 'dojo/_base/html'], function(dojo, xip){
17
18 testXmlGet = function(){
19 /*
20 //Normal xhrGet call.
21 dojo.xhrGet({
22 url: "frag.xml",
23 handleAs: "xml",
24 load: function(result, ioArgs){
25 var foo = result.getElementsByTagName("foo").item(0);
26
27 dojo.byId("xmlGetOut").innerHTML = "Success: First foobar value is: " + foo.firstChild.nodeValue;
28 }
29 });
30 */
31
32 //xip xhrGet call.
33 dojo.xhrGet({
34 iframeProxyUrl: "../xip_server.html",
35 url: "tests/frag.xml",
36 handleAs: "xml",
37 load: function(result, ioArgs){
38 var foo = result.getElementsByTagName("foo").item(0);
39
40 dojo.byId("xmlGetOut").innerHTML = "Success: First foobar value is: " + foo.firstChild.nodeValue;
41 }
42 });
43
44 }
45 });
46
47 </script>
48 </head>
49 <body class="tundra">
50
51 <h1>XHR IFrame Proxy Tests</h1>
52 <p>Run this test from a web server, not from local disk.</p>
53
54 <p>
55 <button onclick="testXmlGet()">Test XML GET</button>
56 </p>
57 <div id="xmlGetOut"></div>
58
59 </body>
60 </html>