diff --git a/html/console.html b/html/console.html index 32683a3..db4c0a6 100644 --- a/html/console.html +++ b/html/console.html @@ -27,9 +27,10 @@ $("#reset-button").addEventListener("click", function(e) { e.preventDefault(); - $("#console").innerHTML = ""; + var co = $("#console"); + co.innerHTML = ""; ajaxSpin('POST', "/console/reset", - function(resp) { showNotification("uC reset"); }, + function(resp) { showNotification("uC reset"); co.textEnd = 0; }, function(s, st) { showWarning("Error resetting uC"); } ); }); diff --git a/html/console.js b/html/console.js index 8694a61..87f7d1a 100644 --- a/html/console.js +++ b/html/console.js @@ -1,5 +1,5 @@ function fetchText(delay, repeat) { - el = $("#console"); + var el = $("#console"); if (el.textEnd == undefined) { el.textEnd = 0; el.innerHTML = ""; @@ -15,9 +15,9 @@ function fetchText(delay, repeat) { } function updateText(resp) { - el = $("#console"); + var el = $("#console"); - delay = 3000; + var delay = 3000; if (resp != null && resp.len > 0) { console.log("updateText got", resp.len, "chars at", resp.start); if (resp.start > el.textEnd) {