autodist/webbuild/html/scripts/socialbox.js

33 lines
1020 B
JavaScript
Raw Normal View History

var url = "/cgi-bin/webbuild.cgi"
function ajax_getvalues_refresh(request) {
if (request != "")
request=request+"&REQUEST=refresh";
else
request="REQUEST=refresh";
if (window.XMLHttpRequest)
xmlhttp1 = new XMLHttpRequest();
else if (window.ActiveXObject)
xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP");
else
return;
xmlhttp1.onreadystatechange = function() {
if (xmlhttp1.readyState != 4)
return;
if (xmlhttp1.responseXML == undefined) {
return;
}
var xmldoc = xmlhttp1.responseXML.documentElement;
if (xmldoc.getElementsByTagName("socialbox").length >0) {
document.getElementById("socialbox").innerHTML = xmldoc.getElementsByTagName("socialbox")[0].childNodes[0].nodeValue;
$(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); });
}
lastupdate = (+new Date());
}
xmlhttp1.open("POST", url, true);
xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp1.send(request);
}