X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=www%2Fdemo%2Fsearch.js;h=b5b462a6912117cbe5a81f5c574f9f16df151a39;hb=5017b103ece3eeb4e3ab181d5e49d50af8e56018;hp=dd06abdeaeb0b4f0e4c0156bed24f37129fe52cd;hpb=6a218e89a107e70e1bbfcf8495a654417f0de332;p=pazpar2-moved-to-github.git diff --git a/www/demo/search.js b/www/demo/search.js index dd06abd..b5b462a 100644 --- a/www/demo/search.js +++ b/www/demo/search.js @@ -1,4 +1,4 @@ -/* $Id: search.js,v 1.3 2007-01-05 13:33:47 sondberg Exp $ +/* $Id: search.js,v 1.6 2007-01-05 14:56:05 sondberg Exp $ * --------------------------------------------------- * Javascript container */ @@ -145,6 +145,11 @@ function update_action (new_action) { } +function make_pager (hits, offset, max) { + return '1 Next'; +} + + function show_records() { if (xshow.readyState != 4) @@ -166,10 +171,15 @@ function show_records() var start = Number(xml.getElementsByTagName('start')[0].childNodes[0].nodeValue); var num = Number(xml.getElementsByTagName('num')[0].childNodes[0].nodeValue); var clients = Number(xml.getElementsByTagName("activeclients")[0].childNodes[0].nodeValue); - body.innerHTML = 'Records : '; - body.innerHTML += (start + 1) + ' to ' + (start + num) + - ' of ' + merged + ' (total hits: ' + total + ')'; - + body.innerHTML = '
'; - body.innerHTML += (i + start + 1) + ': '; var mk = hits[i].getElementsByTagName("title"); - if (mk[0]) - body.innerHTML += mk[0].childNodes[0].nodeValue; - body.innerHTML += '
'; + + body.innerHTML += ''; + + if (mk[0]) { + var field = mk[0].childNodes[0].nodeValue; + } + body.innerHTML += field + ''; } + + body.innerHTML += '