2 return document.getElementById(id);
5 function eowOut(output) {
6 var t = document.createTextNode(output);
7 var p = document.createElement("pre");
9 byId("output").appendChild(p);
10 window.scrollTo(0, window.scrollMaxY);
13 //t = window.setTimeout(f, 10000);
14 //window.clearTimeout(t)
15 //e = document.getElementById(id)
17 function get_next_update() {
19 // The following URL must match that used to test the server.
21 handleAs: "javascript",
24 timeout: 30000, // Time in milliseconds
26 // The LOAD function will be called on a successful response.
27 load: function(response, ioArgs) {
28 console.log(response);
32 // The ERROR function will be called in an error case.
33 error: function(response, ioArgs) {
34 if (response.dojoType == "timeout") {
40 console.error("HTTP status code: ", ioArgs.xhr.status);
46 function submit_cmdline(cmdline_form) {
48 // The following URL must match that used to test the server.
52 timeout: 30000, // Time in milliseconds
54 // The LOAD function will be called on a successful response.
55 load: function(response, ioArgs) {
56 console.log(response);
60 // The ERROR function will be called in an error case.
61 error: function(response, ioArgs) {
62 if (response.dojoType == "timeout") {
67 console.error("HTTP status code: ", ioArgs.xhr.status);
76 byId("prompt").textContent = p;
85 function setup_client() {
86 var input = byId("inputfield");
90 function inputfield_keyup(e) {
91 if (e.keyCode == 13) { // Enter
92 eowOut(byId("prompt").textContent + e.target.value);
93 submit_cmdline(e.target.form.id);
94 window.scrollTo(0, window.scrollMaxY);