- Timestamp:
- 11/19/12 15:56:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-htmlmonitor/src/main/js/autoquest-htmlmonitor.js
r992 r999 73 73 //{ "tag": "blockquote", "actions": [ ] }, 74 74 { "tag": "body", "actions": [ "onbeforeunload", 75 "onload", 75 76 "onunload", 76 77 //"onerror", … … 103 104 //{ "tag": "figure", "actions": [ ] }, 104 105 //{ "tag": "footer", "actions": [ ] }, 105 //{ "tag": "form", "actions": [ ] }, 106 { "tag": "form", "actions": [ "onreset", 107 "onsubmit" ] }, 106 108 //{ "tag": "header", "actions": [ ] }, 107 109 //{ "tag": "hgroup", "actions": [ ] }, … … 115 117 { "tag": "i", "actions": [ "onclick" ] }, 116 118 //{ "tag": "iframe", "actions": [ ] }, 117 { "tag": "img", "actions": [ "onclick" ] }, 119 { "tag": "img", "actions": [ "onabort", 120 "onclick" ] }, 118 121 { "tag": "input_text", "actions": [ "onchange", 119 "onfocus" ] }, 122 "onfocus", 123 "onselect" ] }, 120 124 { "tag": "input_password", "actions": [ "onchange", 121 125 "onfocus" ] }, … … 180 184 { "tag": "td", "actions": [ "onclick" ] }, 181 185 { "tag": "textarea", "actions": [ "onchange", 182 "onfocus" ] }, 186 "onfocus", 187 "onselect" ] }, 183 188 //{ "tag": "tfoot", "actions": [ ] }, 184 189 { "tag": "th", "actions": [ "onclick" ] }, … … 218 223 219 224 /** 225 * stores the interval for sending data of inactive browser windows 226 */ 227 var autoquestSendInterval; 228 229 /** 220 230 * automatically executed to initialize the event handling 221 231 */ … … 237 247 // if the document is not loaded yet, try to add further event handling later 238 248 setTimeout(initEventHandling, 200); 249 } 250 else if (!autoquestSendInterval) { 251 // recall sending data each 100 seconds to ensure, that for browser windows staying 252 // open the data will be send, as well. 253 autoquestSendInterval = setTimeout(sendRequest, 100000); 239 254 } 240 255 } … … 452 467 setTimeout(sendRequest, 100); 453 468 } 454 else if ( eventType === "onunload") {469 else if ((eventType === "onunload") || (eventType === "onbeforeunload")) { 455 470 log("initiating sending events"); 456 471 sendRequest(); … … 700 715 701 716 this.setSelectedValue = function(value) { 702 this.selectedValue = value;717 this.selectedValue = encodeText(value); 703 718 }; 704 719 … … 732 747 return eventInJSON; 733 748 }; 749 750 function encodeText(text) { 751 return text.replace(/\\/g, "\\\\").replace(/\"/g, "\\\""); 752 }; 734 753 } 735 754
Note: See TracChangeset
for help on using the changeset viewer.