Index: openacs-4/packages/xowiki/www/ajax/streaming-chat.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ajax/Attic/streaming-chat.js,v diff -u -r1.7 -r1.8 --- openacs-4/packages/xowiki/www/ajax/streaming-chat.js 17 Feb 2013 11:48:06 -0000 1.7 +++ openacs-4/packages/xowiki/www/ajax/streaming-chat.js 29 Jul 2013 08:56:44 -0000 1.8 @@ -9,6 +9,7 @@ function getData() { //alert('access responseText'); // hmm, IE does not allow us to access responstext in state == 3 :( var response = http.responseText.substring(http_last); + console.log(response); // we recognize a complete message by a trailing }\n if (response.match(/\}[\n ]+$/)) { var messages = document.getElementById('messages'); @@ -56,16 +57,18 @@ } function chatSubscribe(subscribe_url) { + console.log("chatSubscribe " + subscribe_url); http.open('GET', subscribe_url, true); http.onreadystatechange = function() { if (http.readyState == 3) { - getData(); + getData(); } else if (http.readyState == 4) { + //console.log("chatSubscribe readyState = " + http.readyState + " status " + http.status); // alert('status code =' + http.status); var status = http.status; if (status == 200 || status == 0) { - document.getElementById('chatMsg').value = 'logout'; - chatSendMsg(); + //document.getElementById('chatMsg').value = 'logout'; + //chatSendMsg(); } else { alert('Something wrong in HTTP request, status code = ' + status); }