| 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>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 |
djConfig="isDebug:true"></script>
|
|
|
14 |
<script type="text/javascript" src="../xip.js"></script>
|
|
|
15 |
<script type="text/javascript">
|
|
|
16 |
dojo.require("dojox.io.proxy.xip");
|
|
|
17 |
|
|
|
18 |
function testXmlGet(){
|
|
|
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 |
dojo.addOnLoad(function(){
|
|
|
47 |
|
|
|
48 |
});
|
|
|
49 |
</script>
|
|
|
50 |
</head>
|
|
|
51 |
<body class="tundra">
|
|
|
52 |
|
|
|
53 |
<h1>XHR IFrame Proxy Tests</h1>
|
|
|
54 |
<p>Run this test from a web server, not from local disk.</p>
|
|
|
55 |
|
|
|
56 |
<p>
|
|
|
57 |
<button onclick="testXmlGet()">Test XML GET</button>
|
|
|
58 |
</p>
|
|
|
59 |
<div id="xmlGetOut"></div>
|
|
|
60 |
|
|
|
61 |
</body>
|
|
|
62 |
</html>
|