aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/io/proxy/tests/xip.html
blob: 5a5ba5f76f3a3ffdbb2c178f93e8b1eb4c2a65de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>XHR IFrame Proxy Tests</title>
	<style type="text/css">
		@import "../../../../dojo/resources/dojo.css";
		@import "../../../../dijit/themes/tundra/tundra.css";
		@import "../../../../dijit/themes/dijit.css";
	</style>

	<script type="text/javascript" src="../../../../dojo/dojo.js"
		djConfig="isDebug:true"></script>
	<script type="text/javascript" src="../xip.js"></script>
	<script type="text/javascript">
		dojo.require("dojox.io.proxy.xip");

		function testXmlGet(){
/*
			//Normal xhrGet call.
			dojo.xhrGet({
				url: "frag.xml",
				handleAs: "xml",
				load: function(result, ioArgs){
					var foo = result.getElementsByTagName("foo").item(0);

					dojo.byId("xmlGetOut").innerHTML = "Success: First foobar value is: " + foo.firstChild.nodeValue;
				}
			});
*/

			//xip xhrGet call.
			dojo.xhrGet({
				iframeProxyUrl: "../xip_server.html",
				url: "tests/frag.xml",
				handleAs: "xml",
				load: function(result, ioArgs){
					var foo = result.getElementsByTagName("foo").item(0);

					dojo.byId("xmlGetOut").innerHTML = "Success: First foobar value is: " + foo.firstChild.nodeValue;
				}
			});

		}

		dojo.addOnLoad(function(){

		});
	</script>
</head>
<body class="tundra">

<h1>XHR IFrame Proxy Tests</h1>
<p>Run this test from a web server, not from local disk.</p>

<p>
<button onclick="testXmlGet()">Test XML GET</button>
</p>
<div id="xmlGetOut"></div>

</body>
</html>