Index: /trunk/autoquest-htmlmonitor/src/main/js/autoquest-htmlmonitor.js
===================================================================
--- /trunk/autoquest-htmlmonitor/src/main/js/autoquest-htmlmonitor.js	(revision 998)
+++ /trunk/autoquest-htmlmonitor/src/main/js/autoquest-htmlmonitor.js	(revision 999)
@@ -73,4 +73,5 @@
     //{ "tag": "blockquote", "actions": [  ] },
     { "tag": "body", "actions": [ "onbeforeunload",
+                                  "onload",
                                   "onunload",
                                   //"onerror",
@@ -103,5 +104,6 @@
     //{ "tag": "figure", "actions": [  ] },
     //{ "tag": "footer", "actions": [  ] },
-    //{ "tag": "form", "actions": [  ] },
+    { "tag": "form", "actions": [ "onreset",
+                                  "onsubmit" ] },
     //{ "tag": "header", "actions": [  ] },
     //{ "tag": "hgroup", "actions": [  ] },
@@ -115,7 +117,9 @@
     { "tag": "i", "actions": [ "onclick" ] },
     //{ "tag": "iframe", "actions": [  ] },
-    { "tag": "img", "actions": [ "onclick" ] },
+    { "tag": "img", "actions": [ "onabort",
+                                 "onclick" ] },
     { "tag": "input_text", "actions": [ "onchange",
-                                        "onfocus" ] },
+                                        "onfocus",
+                                        "onselect" ] },
     { "tag": "input_password", "actions": [ "onchange",
                                             "onfocus" ] },
@@ -180,5 +184,6 @@
     { "tag": "td", "actions": [ "onclick" ] },
     { "tag": "textarea", "actions": [ "onchange",
-                                      "onfocus" ] },
+                                      "onfocus",
+                                      "onselect" ] },
     //{ "tag": "tfoot", "actions": [  ] },
     { "tag": "th", "actions": [ "onclick" ] },
@@ -218,4 +223,9 @@
 
 /**
+ * stores the interval for sending data of inactive browser windows
+ */
+var autoquestSendInterval;
+
+/**
  * automatically executed to initialize the event handling
  */
@@ -237,4 +247,9 @@
             // if the document is not loaded yet, try to add further event handling later
             setTimeout(initEventHandling, 200);
+        }
+        else if (!autoquestSendInterval) {
+            // recall sending data each 100 seconds to ensure, that for browser windows staying
+            // open the data will be send, as well.
+            autoquestSendInterval = setTimeout(sendRequest, 100000);
         }
     }
@@ -452,5 +467,5 @@
         setTimeout(sendRequest, 100);
     }
-    else if (eventType === "onunload") {
+    else if ((eventType === "onunload") || (eventType === "onbeforeunload")) {
         log("initiating sending events");
         sendRequest();
@@ -700,5 +715,5 @@
     
     this.setSelectedValue = function(value) {
-        this.selectedValue = value;
+        this.selectedValue = encodeText(value);
     };
   
@@ -732,4 +747,8 @@
         return eventInJSON;
     };
+    
+    function encodeText(text) {
+        return text.replace(/\\/g, "\\\\").replace(/\"/g, "\\\"");
+    };
 } 
 
