X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fjsdemo%2Fexample_client.js;h=0df0002577defdfe08b92017633b6ad84daf1658;hb=5c050b4ec84d485021bce4a43389bc572073f635;hp=dc10ad15709bebd8969dd2ccd83b024af152763e;hpb=661865e0c4a8cb6ad8fe28f40801a9108fb5fa87;p=pazpar2-moved-to-github.git diff --git a/www/jsdemo/example_client.js b/www/jsdemo/example_client.js index dc10ad1..0df0002 100644 --- a/www/jsdemo/example_client.js +++ b/www/jsdemo/example_client.js @@ -1,5 +1,5 @@ /* A very simple client that shows a basic usage of the pz2.js -** $Id: example_client.js,v 1.4 2007-07-16 17:01:46 adam Exp $ +** $Id: example_client.js,v 1.5 2007-07-24 08:15:12 jakub Exp $ */ // create a parameters array and pass it to the pz2's constructor @@ -94,16 +94,16 @@ function my_onterm(data) { termlist.innerHTML = "
TERMLISTS:
"; termlist.innerHTML += '
.::Subjects
'; for (var i = 0; i < data.subject.length; i++ ) { - termlist.innerHTML += '' + termlist.innerHTML += '' + data.subject[i].name - + ' (' + + ' (' + data.subject[i].freq + ')
'; } termlist.innerHTML += "
"; termlist.innerHTML += '
.::Authors
'; for (var i = 0; i < data.author.length; i++ ) { - termlist.innerHTML += '' + termlist.innerHTML += '' + data.author[i].name + ' (' + data.author[i].freq @@ -176,6 +176,12 @@ function drawCurDetails () ""; } +// limit the query after clicking the facet +function limitQuery (field, value) +{ + document.search.query.value += ' and ' + field + '="' + value + '"'; + onFormSubmitEventHandler(); +} // simple paging functions