aboutsummaryrefslogtreecommitdiffstats
path: root/config/imspector/services_imspector_logs.php
diff options
context:
space:
mode:
authorBill Marquette <bill.marquette@gmail.com>2009-03-10 22:25:27 -0500
committerBill Marquette <bill.marquette@gmail.com>2009-03-10 22:26:15 -0500
commit2e0c1cc991c4cc2e5ea619941cf0eedaf2777423 (patch)
tree11108cc63d8604fab9f58c203676a64a2d49f382 /config/imspector/services_imspector_logs.php
parent5227386a27292542a37025b23752febcd3cce5fb (diff)
downloadpfsense-packages-2e0c1cc991c4cc2e5ea619941cf0eedaf2777423.tar.gz
pfsense-packages-2e0c1cc991c4cc2e5ea619941cf0eedaf2777423.tar.bz2
pfsense-packages-2e0c1cc991c4cc2e5ea619941cf0eedaf2777423.zip
Revert "remove home rolled xmlhttpPost crap, use Prototype"
This reverts commit ecacddc29028cf9f6e94d326461d7a6087493ba1.
Diffstat (limited to 'config/imspector/services_imspector_logs.php')
-rw-r--r--config/imspector/services_imspector_logs.php44
1 files changed, 24 insertions, 20 deletions
diff --git a/config/imspector/services_imspector_logs.php b/config/imspector/services_imspector_logs.php
index ecb8606f..14881bc6 100644
--- a/config/imspector/services_imspector_logs.php
+++ b/config/imspector/services_imspector_logs.php
@@ -172,23 +172,26 @@ var section = 'none';
var moveit = 1;
var the_timeout;
-function xmlhttpPost(){
- var url = "/services_imspector_logs.php"
- new Ajax.Request(url, {
- method: 'post',
- parameters: {
- mode: 'render',
- section: section
- },
- onSuccess: function(transport){
- var response = transport.responseText || "";
- updatepage(response);
- $('im_status').style.display = "none";
- },
- onLoading: function(){
- $('im_status').style.display = "inline";
- }
- });
+function xmlhttpPost()
+{
+ var xmlHttpReq = false;
+ var self = this;
+
+ if (window.XMLHttpRequest)
+ self.xmlHttpReq = new XMLHttpRequest();
+ else if (window.ActiveXObject)
+ self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
+
+ self.xmlHttpReq.open('POST', 'services_imspector_logs.php', true);
+ self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+
+ self.xmlHttpReq.onreadystatechange = function() {
+ if (self.xmlHttpReq && self.xmlHttpReq.readyState == 4)
+ updatepage(self.xmlHttpReq.responseText);
+ }
+
+ $('im_status').style.display = "inline";
+ self.xmlHttpReq.send("mode=render&section=" + section);
}
function updatepage(str)
@@ -230,11 +233,12 @@ function updatepage(str)
/* determine the title of this conversation */
var details = parts[1].split(",");
- var title = details[0] + " conversation between <span style='color: $convo_local_color;'>" + details[1] +
+ var title = details[0] + " conversation between <span style='color: $convo_local_color;'>" + details[ 1 ] +
"</span> and <span style='color: $convo_remote_color;'>" + details[2] + "</span>";
if (!details[1]) title = "&nbsp;";
if (!parts[2]) parts[2] = "&nbsp;";
+ $('im_status').style.display = "none";
var bottom = parseInt($('im_content').scrollTop);
var bottom2 = parseInt($('im_content').style.height);
var absheight = parseInt( bottom + bottom2 );
@@ -243,12 +247,12 @@ function updatepage(str)
} else {
moveit = 0;
}
- $('im_content').update(parts[2]);
+ $('im_content').innerHTML = parts[2];
if (moveit == 1) {
$('im_content').scrollTop = 0;
$('im_content').scrollTop = $('im_content').scrollHeight;
}
- $('im_content_title').update(title);
+ $('im_content_title').update = title;
the_timeout = setTimeout( "xmlhttpPost();", 5000 );
}