+function byId(id) {
+ return document.getElementById(id);
+}
+
function eowOut(output) {
var t = document.createTextNode(output);
- var p = document.createElement("p");
+ var p = document.createElement("pre");
p.appendChild(t);
- dojo.byId("output").appendChild(p);
+ byId("output").appendChild(p);
+ window.scrollTo(0, window.scrollMaxY);
}
+//t = window.setTimeout(f, 10000);
+//window.clearTimeout(t)
+//e = document.getElementById(id)
+
function get_next_update() {
dojo.xhrGet( {
// The following URL must match that used to test the server.
}
function prompt(minutes, btus) {
- eowOut("[" + minutes + "," + btus + "]: ");
+ byId("prompt").textContent = "[" + minutes + "," + btus + "]: ";
get_next_update();
}
}
function setup_client() {
- var input = dojo.byId("inputfield");
+ var input = byId("inputfield");
input.focus();
}
function inputfield_keyup(e) {
- console.log(e);
if (e.keyCode == 13) { // Enter
+ eowOut(byId("prompt").textContent + e.target.value);
submit_cmdline(e.target.form.id);
+ window.scrollTo(0, window.scrollMaxY);
e.target.value = "";
}
}