Index: trunk/webapps/einotebook/script/scrollframe.js
===================================================================
--- trunk/webapps/einotebook/script/scrollframe.js	(revision 548)
+++ trunk/webapps/einotebook/script/scrollframe.js	(revision 551)
@@ -12,6 +12,9 @@
 }
 
+// Collect all the ratings from the events 
 function collectRatings() 
 {
+    var output = ""
+    var ratingCount = 0
     // Consider each event in the incident script
     for (var evtidx = 0; evtidx < events.length; evtidx++)
@@ -27,10 +30,14 @@
                 // If it not the default value we want to save it
                 if (item.rating > 0)
-                {
-                    console.log("collecting event"+evtidx + " at " + events[evtidx].time.format() +" "+item.type + " " + item.rating)
+                {   // Build a string for the log in this format:
+                    //03:01:00, Evaluation, CMS, Poor
+                    output += events[evtidx].time.format() +", Evaluation, "+item.type + ", " + item.ratingQualities[item.rating] + "\n"
+                    ratingCount += 1;  
                 }
             }
         }
     }
+    submitRatings(output);
+    alert(ratingCount + " rating were saved.")
 }
 
@@ -55,12 +62,12 @@
 */
 
-// TODO
-function submitRatings()
+// Send the string of ratings to the server
+function submitRatings(logString)
 {
         // Using POST to send the data 
         var xhr = new XMLHttpRequest();
-        xhr.open("POST", "../../cgi-bin/saveRatings.py", true);
+        xhr.open("POST", "/cgi-bin/saveRatingsToLog.py", true);
         xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
         // send the collected data
-        xhr.send("msg="+outString);
+        xhr.send("msg="+logString);
 }
