From 5c050b4ec84d485021bce4a43389bc572073f635 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Tue, 24 Jul 2007 08:15:12 +0000 Subject: [PATCH] Added clickable facets to the jsdemo. --- www/jsdemo/example_client.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 -- 1.7.10.4