summaryrefslogtreecommitdiff
path: root/includes/js/dojox/io/proxy/tests
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
commite44a7e37b6c7b5961adaffc62b9042b8d442938e (patch)
tree95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/io/proxy/tests
parenta62b9742ee5e28bcec6872d88f50f25b820914f6 (diff)
downloadsemanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz
semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/io/proxy/tests')
-rw-r--r--includes/js/dojox/io/proxy/tests/frag.xml4
-rw-r--r--includes/js/dojox/io/proxy/tests/xip.html62
2 files changed, 66 insertions, 0 deletions
diff --git a/includes/js/dojox/io/proxy/tests/frag.xml b/includes/js/dojox/io/proxy/tests/frag.xml
new file mode 100644
index 0000000..6904bba
--- /dev/null
+++ b/includes/js/dojox/io/proxy/tests/frag.xml
@@ -0,0 +1,4 @@
+<response>
+<foo>This is the foo text node value</foo>
+<bar>This is the bar text node value</bar>
+</response>
diff --git a/includes/js/dojox/io/proxy/tests/xip.html b/includes/js/dojox/io/proxy/tests/xip.html
new file mode 100644
index 0000000..5a5ba5f
--- /dev/null
+++ b/includes/js/dojox/io/proxy/tests/xip.html
@@ -0,0 +1,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>