From 9aac567e2b6c4eb31c4154a0f72a589b1778e652 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Fri, 13 Dec 2013 17:22:41 +0100 Subject: [PATCH] Providing debug output in case of HTTP error codes --- web/htdocs/scripts/scriptsnew.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/htdocs/scripts/scriptsnew.js b/web/htdocs/scripts/scriptsnew.js index 3cfbbc5..814f76b 100644 --- a/web/htdocs/scripts/scriptsnew.js +++ b/web/htdocs/scripts/scriptsnew.js @@ -49,6 +49,12 @@ function getdataprint(command,dId,async,time,callback) { //cb(xmlhttp.responseText); //document.getElementById(destId).innerHTML = xmlhttp.responseText; } + else if (xmlhttp.readyState == 4) { + document.getElementById("returntext").innerHTML = xmlhttp.responseText; + if(cb) { + cb(time); + } + } } xmlhttp.open("GET",command,async); @@ -109,4 +115,4 @@ b = Math.floor(b); return "rgb("+(r%256)+","+(g%256)+","+(b%256)+")"; -} \ No newline at end of file +} -- 2.43.0