--- /dev/null
+eowOut("Hello, Ajax world!");
--- /dev/null
+function eowOut(output) {
+ var t = document.createTextNode(output);
+ var p = document.createElement("p");
+ p.appendChild(t);
+ dojo.byId("output").appendChild(p);
+}
+
+function hello() {
+ dojo.xhrGet( {
+ // The following URL must match that used to test the server.
+ url: "/eow/static/ajax.txt",
+ handleAs: "javascript",
+
+ timeout: 5000, // Time in milliseconds
+
+ // The LOAD function will be called on a successful response.
+ load: function(response, ioArgs) {
+ console.log(response);
+ return response;
+ },
+
+ // The ERROR function will be called in an error case.
+ error: function(response, ioArgs) {
+ console.error("HTTP status code: ", ioArgs.xhr.status);
+ return response;
+ }
+ });
+}
+
--- /dev/null
+html { height: 100%; }
+body { background: #fff; font-size: 12px; font-family: monospace; height: 99%; margin:0px; padding: 0px; }
+form { padding: 0px; margin: 0px; }
+pre { font-size: 12px; }
+br { clear: both; }
+:focus { outline: 0; }
+input.cmdline { border: none; border: 0px; font-size: 12px; font-family: monospace; padding: 0px; margin:0px; width:100%; }
+table.inputtable { width:100%; vertical-align:top; }
+td.inputtd { width:100%; }
+#input { margin-left: 8px; color: #666; overflow: hidden; }
+#output{ margin-left: 8px; margin-top: 8px; }
+.less { color: #666; }
+.info { color: #090; }
+table { padding: 0px; margin: 0px; border-collapse: collapse; border-spacing: 0px; }
+td { padding: 0px; margin: 0px; vertical-align: top; font-size: 12px; font-family: monospace; }
+.help td { padding-right: 25px; font-size: 12px; }
+div#prompt { display: inline; white-space:nowrap; padding:0px; margin:0px; }
+img { border: none; }
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<link rel="stylesheet" type="text/css" href="style.css">
+<title>Empire Web Client</title>
+
+<script type="text/javascript" src="dojo-release-1.1.1/dojo/dojo.js"
+ djConfig="parseOnLoad:true, isDebug:false"></script>
+<script type="text/javascript" src="eow.js"></script>
+<script type="text/javascript">
+var init = function(){
+ console.log("I run after the page is ready. See this in the console");
+ hello();
+};
+dojo.addOnLoad(init);
+</script>
+
+</head>
+
+<body>
+<div id="output">
+<span class="less">EOW alpha0 Empire/Ajax</span>
+<br/>
+<br/>
+<span class="info">Welcome to the Empire over the Web client (EOW).</span>
+</div>
+<div id="input">
+<form name='f' onsubmit='return false;' class='cmdline' action=''>
+<table class="inputtable"><tr><td><div id='prompt' class='less'>> </div></td><td class="inputtd"><input id='inputfield' name='q' type='text' class='cmdline' autocomplete='off' value="" /></td></tr></table>
+</form>
+</div>
+
+<hr>
+<address></address>
+<!-- hhmts start --> Last modified: Sun Nov 23 01:38:22 CET 2008 <!-- hhmts end -->
+</body> </html>