aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/json-1.5.1/data/index.html
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2011-03-28 15:18:21 +0100
committerLouise Crow <louise.crow@gmail.com>2011-03-28 15:18:21 +0100
commit73ae7435e0aaa83518d51f390e4f99778df85b4f (patch)
tree5de39cdb844ca8e8d237f4def0f35586d7b2042b /vendor/gems/json-1.5.1/data/index.html
parent6e36729b44673a0e77f03e100d094ebf020e8e32 (diff)
parent22c25e42847d41924d43d31f3ef67be1ae4a155e (diff)
Merge branch 'master' of git@github.com:sebbacon/alaveteli
Diffstat (limited to 'vendor/gems/json-1.5.1/data/index.html')
-rw-r--r--vendor/gems/json-1.5.1/data/index.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/gems/json-1.5.1/data/index.html b/vendor/gems/json-1.5.1/data/index.html
new file mode 100644
index 000000000..abe6fdbfa
--- /dev/null
+++ b/vendor/gems/json-1.5.1/data/index.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <head>
+ <title>Javascript Example</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <script src="prototype.js" type="text/javascript"></script>
+ </head>
+
+ <body>
+ <h1>Fetching object from server</h1>
+ <div id="list">
+ Wait...<br/>
+ <noscript><p>Switch on Javascript!</p></noscript>
+ </div>
+ <script type="text/javascript">
+ <!--
+ function pollJSON() {
+ new Ajax.Request('/json',
+ {
+ method: 'get',
+ onSuccess: function(transport) {
+ var response = transport.responseText || "no response text";
+ response = eval("(" + response + ")");
+ var text = "";
+ for (var k in response) {
+ text = text + "<b>" + k + "</b>: " + response[k] + "<br/>"
+ }
+ $("list").update(text);
+ },
+ onFailure: function() { alert('Something went wrong...') }
+ });
+ }
+ new PeriodicalExecuter(pollJSON, 1);
+ -->
+ </script>
+ </body>
+</html>