-function prompt(minutes, btus) {
- eowOut("[" + minutes + "," + btus + "]: ");
+function submit_cmdline(cmdline_form) {
+ dojo.xhrGet( {
+ // The following URL must match that used to test the server.
+ url: "/eow/command",
+ handleAs: "text",
+
+ timeout: 30000, // 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) {
+ if (response.dojoType == "timeout") {
+ ioArgs.xhr.abort();
+ return response;
+ }
+
+ console.error("HTTP status code: ", ioArgs.xhr.status);
+ return response;
+ },
+
+ form: cmdline_form
+ });
+}
+
+function prompt(p) {
+ byId("prompt").textContent = p;
+}
+
+function msg(m) {
+ eowOut(m);
+}
+
+function next() {