- var refine_cell;
- if (listname != 'xtargets')
- {
- refine_cell = create_element('a', term + ' (' + freq + ')');
- refine_cell.setAttribute('href', '#');
- refine_cell.setAttribute('term', term);
- refine_cell.setAttribute('facet', listname);
- refine_cell.onclick = function () {
- refine_query(this);
- return false;
- };
- }
- else
- refine_cell = create_element('div', term + ' (' + freq + ')');
- body.appendChild(refine_cell);
+ var id;
+ if (idn[0])
+ id = idn[0].childNodes[0].nodeValue;
+ var refine_cell = create_element('a', term + ' (' + freq + ')');
+ refine_cell.setAttribute('href', '#');
+ refine_cell.setAttribute('term', term);
+ refine_cell.setAttribute('facet', listname);
+ refine_cell.setAttribute('target_id', id);
+ refine_cell.onclick = function () {
+ refine_query(this);
+ return false;
+ };
+ body.appendChild(refine_cell);