piggyback counter information on headlines call

This commit is contained in:
Andrew Dolgov
2007-05-15 06:59:22 +01:00
parent 5a94a953ea
commit 3de0261a53
4 changed files with 491 additions and 457 deletions

View File

@@ -40,8 +40,23 @@ function headlines_callback() {
try {
f.scrollTop = 0;
} catch (e) { };
f.innerHTML = xmlhttp.responseText;
update_all_counters();
if (xmlhttp.responseXML) {
var headlines = xmlhttp.responseXML.getElementsByTagName("headlines")[0];
var counters = xmlhttp.responseXML.getElementsByTagName("counters")[0];
f.innerHTML = headlines.firstChild.nodeValue;
if (counters) {
debug("parsing piggybacked counters: " + counters);
parse_counters(counters, false);
}
} else {
debug("headlines_callback: returned no XML object");
f.innerHTML = xmlhttp.responseText;
update_all_counters();
}
if (typeof correctPNG != 'undefined') {
correctPNG();
}