Index: trunk/FACT++/www/viewer/index.html
===================================================================
--- trunk/FACT++/www/viewer/index.html	(revision 17710)
+++ trunk/FACT++/www/viewer/index.html	(revision 17711)
@@ -73,9 +73,9 @@
       <div id="textcontainer2"> 
          <textarea id="editor2" name="editor2" type="textarea">
-print("test\n2nd line\n");
+print("This output will go to the Console.\n");
 
 // The four first values of pixel 1
 var arr = [ $.data[1][0], $.data[1][1], $.data[1][2], $.data[1][3] ];
-print("return [ "+arr+" ]\n");
+print("Pixel 1: [ "+arr+" ]\n");
 
 // Get the maximum sample from each pixel
Index: trunk/FACT++/www/viewer/index.js
===================================================================
--- trunk/FACT++/www/viewer/index.js	(revision 17710)
+++ trunk/FACT++/www/viewer/index.js	(revision 17711)
@@ -321,5 +321,7 @@
 function onDataReceived(rc)
 {
+    var err = document.getElementById("error");
     var dbg = document.getElementById("debug");
+    var con = document.getElementById("console");
 
     var pre = document.createElement("pre");
@@ -343,21 +345,15 @@
     el.appendChild(document.createTextNode(rc.event.numEvents));
 
-    if (rc.timeJs)
-    {
-        var err = document.getElementById("error");
+    if (rc.ret)
+    {
+        while (con.lastChild)
+            con.removeChild(con.lastChild);
+    }
+
+    if (rc.err)
+    {
         while (err.lastChild)
             err.removeChild(err.lastChild);
 
-        $("#accordion").accordion("option", "active", false);
-        $("#accordion").find('h3').filter(':contains(Runtime)').hide();
-
-        var con = document.getElementById("console");
-        while (con.lastChild)
-            con.removeChild(con.lastChild);
-    }
-
-
-    if (rc.err)
-    {
         err.appendChild(document.createTextNode("Javascript runtime exception: "+rc.err.file+":"+rc.err.lineNumber));
         err.appendChild(document.createTextNode("\n"));
@@ -524,4 +520,11 @@
         dbg.removeChild(dbg.lastChild);
 
+    var active = $("#accordion").accordion("option", "active");
+    if (active==0)
+    {
+        $("#accordion").accordion("option", "active", false);
+        $("#accordion").find('h3').filter(':contains(Runtime)').hide();
+    }
+
     var event   = document.getElementById("event").value;
     var pixel   = document.getElementById("pixel").value;
@@ -531,5 +534,6 @@
     var uri = "file="+file+"&event="+event+"&pixel="+map[pixel];
     uri += "&source1="+encodeURIComponent(source1);
-    uri += "&source2="+encodeURIComponent(source2);
+    if (!pixelOnly)
+        uri += "&source2="+encodeURIComponent(source2);
 
     $.ajax({
