]>
Commit | Line | Data |
---|---|---|
1 | var xmlhttp_rpc = false; | |
2 | ||
3 | /*@cc_on @*/ | |
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. | |
7 | try { | |
8 | xmlhttp_rpc = new ActiveXObject("Msxml2.XMLHTTP"); | |
9 | } catch (e) { | |
10 | try { | |
11 | xmlhttp_rpc = new ActiveXObject("Microsoft.XMLHTTP"); | |
12 | } catch (E) { | |
13 | xmlhttp_rpc = false; | |
14 | } | |
15 | } | |
16 | @end @*/ | |
17 | ||
18 | if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') { | |
19 | xmlhttp_rpc = new XMLHttpRequest(); | |
20 | } | |
21 | ||
22 | /* | |
23 | function label_counters_callback() { | |
24 | if (xmlhttp_rpc.readyState == 4) { | |
25 | var reply = xmlhttp_rpc.responseXML.firstChild; | |
26 | ||
27 | var f_document = parent.frames["feeds-frame"].document; | |
28 | ||
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"); | |
32 | ||
33 | var feedctr = f_document.getElementById("FEEDCTR-" + id); | |
34 | var feedu = f_document.getElementById("FEEDU-" + id); | |
35 | ||
36 | feedu.innerHTML = ctr; | |
37 | ||
38 | if (ctr > 0) { | |
39 | feedctr.className = "odd"; | |
40 | } else { | |
41 | feedctr.className = "invisible"; | |
42 | } | |
43 | } | |
44 | } | |
45 | } | |
46 | ||
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); | |
53 | } | |
54 | } | |
55 | */ |