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

View File

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