]>
git.wh0rd.org - tt-rss.git/blob - view.js
1 var xmlhttp_rpc
= false;
4 /*@if (@_jscript_version >= 5)
5 // JScript gives us Conditional compilation, we can cope with old IE versions.
6 // and security blocked creation of the objects.
8 xmlhttp_rpc = new ActiveXObject("Msxml2.XMLHTTP");
11 xmlhttp_rpc = new ActiveXObject("Microsoft.XMLHTTP");
18 if (!xmlhttp_rpc
&& typeof XMLHttpRequest
!='undefined') {
19 xmlhttp_rpc
= new XMLHttpRequest();
23 function label_counters_callback() {
24 if (xmlhttp_rpc.readyState == 4) {
25 var reply = xmlhttp_rpc.responseXML.firstChild;
27 var f_document = parent.frames["feeds-frame"].document;
29 for (var l = 0; l < reply.childNodes.length; l++) {
30 var id = reply.childNodes[l].getAttribute("id");
31 var ctr = reply.childNodes[l].getAttribute("counter");
33 var feedctr = f_document.getElementById("FEEDCTR-" + id);
34 var feedu = f_document.getElementById("FEEDU-" + id);
36 feedu.innerHTML = ctr;
39 feedctr.className = "odd";
41 feedctr.className = "invisible";
47 function update_label_counters() {
48 if (xmlhttp_ready(xmlhttp_rpc)) {
49 var query = "backend.php?op=rpc&subop=getLabelCounters";
50 xmlhttp_rpc.open("GET", query, true);
51 xmlhttp_rpc.onreadystatechange=label_counters_callback;
52 xmlhttp_rpc.send(null);