From: Wolfram Schneider Date: Tue, 16 Dec 2008 18:07:25 +0000 (+0100) Subject: Write to
only if it exists X-Git-Tag: v1.1.0~58 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=e0fd929c14a4b675290d3179239a5e6a45e55418;p=pazpar2-moved-to-github.git Write to
only if it exists Fix off-by-one error in 'Displaying' statistics: 0-20, 20-40 -> 1-20, 21-40 --- diff --git a/www/jsdemo/example_client.js b/www/jsdemo/example_client.js index 6a4be33..2b10465 100644 --- a/www/jsdemo/example_client.js +++ b/www/jsdemo/example_client.js @@ -49,7 +49,7 @@ function my_onshow(data) { var pager = document.getElementById("pager"); pager.innerHTML = ""; pager.innerHTML +='
Displaying: ' - + data.start + ' to ' + (data.start + data.num) + + + (data.start + 1) + ' to ' + (data.start + data.num) + ' of ' + data.merged + ' (found: ' + data.total + ')
'; drawPager(pager); @@ -80,6 +80,9 @@ function my_onshow(data) { function my_onstat(data) { var stat = document.getElementById("stat"); + if (stat == null) + return; + stat.innerHTML = ' .:STATUS INFO -- Active clients: ' + data.activeclients + '/' + data.clients + ' -- '