1 function eowOut(output) {
2 var t = document.createTextNode(output);
3 var p = document.createElement("p");
5 dojo.byId("output").appendChild(p);
8 function get_next_update() {
10 // The following URL must match that used to test the server.
12 handleAs: "javascript",
15 timeout: 30000, // Time in milliseconds
17 // The LOAD function will be called on a successful response.
18 load: function(response, ioArgs) {
19 console.log(response);
23 // The ERROR function will be called in an error case.
24 error: function(response, ioArgs) {
25 if (response.dojoType == "timeout") {
31 console.error("HTTP status code: ", ioArgs.xhr.status);
37 function submit_cmdline(cmdline_form) {
39 // The following URL must match that used to test the server.
43 timeout: 30000, // Time in milliseconds
45 // The LOAD function will be called on a successful response.
46 load: function(response, ioArgs) {
47 console.log(response);
51 // The ERROR function will be called in an error case.
52 error: function(response, ioArgs) {
53 if (response.dojoType == "timeout") {
58 console.error("HTTP status code: ", ioArgs.xhr.status);
66 function prompt(minutes, btus) {
67 eowOut("[" + minutes + "," + btus + "]: ");
76 function setup_client() {
77 var input = dojo.byId("inputfield");
81 function inputfield_keyup(e) {
83 if (e.keyCode == 13) { // Enter
84 submit_cmdline(e.target.form.id);