1 function eowOut(output) {
2 var t = document.createTextNode(output);
3 var p = document.createElement("pre");
5 dojo.byId("output").appendChild(p);
6 window.scrollTo(0, window.scrollMaxY);
9 //t = window.setTimeout(f, 10000);
10 //window.clearTimeout(t)
11 //e = document.getElementById(id)
13 function get_next_update() {
15 // The following URL must match that used to test the server.
17 handleAs: "javascript",
20 timeout: 30000, // Time in milliseconds
22 // The LOAD function will be called on a successful response.
23 load: function(response, ioArgs) {
24 console.log(response);
28 // The ERROR function will be called in an error case.
29 error: function(response, ioArgs) {
30 if (response.dojoType == "timeout") {
36 console.error("HTTP status code: ", ioArgs.xhr.status);
42 function submit_cmdline(cmdline_form) {
44 // The following URL must match that used to test the server.
48 timeout: 30000, // Time in milliseconds
50 // The LOAD function will be called on a successful response.
51 load: function(response, ioArgs) {
52 console.log(response);
56 // The ERROR function will be called in an error case.
57 error: function(response, ioArgs) {
58 if (response.dojoType == "timeout") {
63 console.error("HTTP status code: ", ioArgs.xhr.status);
71 function prompt(minutes, btus) {
72 dojo.byId("prompt").textContent = "[" + minutes + "," + btus + "]: ";
81 function setup_client() {
82 var input = dojo.byId("inputfield");
86 function inputfield_keyup(e) {
87 if (e.keyCode == 13) { // Enter
88 eowOut(dojo.byId("prompt").textContent + e.target.value);
89 submit_cmdline(e.target.form.id);
90 window.scrollTo(0, window.scrollMaxY);