From e0fd929c14a4b675290d3179239a5e6a45e55418 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 16 Dec 2008 19:07:25 +0100 Subject: [PATCH] Write to
only if it exists Fix off-by-one error in 'Displaying' statistics: 0-20, 20-40 -> 1-20, 21-40 --- www/jsdemo/example_client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 + ' -- ' -- 1.7.10.4