Archived
1
0
This commit is contained in:
Jeff Becker 2016-12-26 11:24:30 -05:00
parent 8f9622dca8
commit 23390b5998

View File

@ -35,10 +35,10 @@ function inject_search(elem) {
if(ajax.status == 200) { if(ajax.status == 200) {
// good // good
var result = JSON.parse(ajax.responseText); var result = JSON.parse(ajax.responseText);
if (result.length == 0) { if (result.length == 1) {
status.innerHTML = "no results"; status.innerHTML = "no results";
} else { } else {
status.innerHTML = "found "+result.length+" results"; status.innerHTML = "found "+(result.length - 1)+" results";
for (var idx = 0 ; idx < result.length; idx++ ) { for (var idx = 0 ; idx < result.length; idx++ ) {
inject_search_result(result[idx]); inject_search_result(result[idx]);
} }