--- a/src/main/resources/scripts/tracker.js Tue Aug 23 17:07:07 2011 -0400
+++ b/src/main/resources/scripts/tracker.js Tue Aug 23 18:01:35 2011 -0400
@@ -35,8 +35,16 @@
},
log : function (msg) {
- var element = document.getElementById("log");
- if (element != null) element.textContent = msg;
+ try {
+
+ console.log(msg);
+ } catch (e) {
+ var element = document.getElementById("log");
+ if (element != null) {
+ if (element.textContent != null) element.textContent = msg;
+ if (element.innerHTML != null) element.innerHTML = msg;
+ }
+ }
},
// pretty formatting of numbers
@@ -72,6 +80,7 @@
};
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Content-Length", data.length);
+ xhr.setRequestHeader("Accept", "text/plain");
xhr.send(JSON.stringify(data));