-/* $Id: search.js,v 1.32 2007-01-16 19:42:20 quinn Exp $
+/* $Id: search.js,v 1.34 2007-01-17 02:15:12 quinn Exp $
* ---------------------------------------------------
* Javascript container
*/
return 'ISBN';
else if (name == 'md-publisher')
return 'Publisher';
+ else if (name == 'md-url')
+ return 'URL';
else
return name;
}
return 'au';
else if (name == 'md-subject')
return 'su';
+ else if (name == 'md-url')
+ return 'URL';
else
return 0;
}
if (hyl)
{
nv = create_element('a', value);
- nv.setAttribute('href', '#');
- nv.setAttribute('term', value);
- nv.setAttribute('searchfield', hyl);
- nv.onclick = function() { hyperlink_search(this); return false; };
+ if (hyl == 'URL')
+ {
+ nv.setAttribute('href', value);
+ nv.setAttribute('target', '_blank');
+ }
+ else
+ {
+ nv.setAttribute('href', '#');
+ nv.setAttribute('term', value);
+ nv.setAttribute('searchfield', hyl);
+ nv.onclick = function() { hyperlink_search(this); return false; };
+ }
}
else
nv = document.createTextNode(value);
cur_id = id;
cur_rec = xml;
+ var nodes = document.getElementsByName('listrecord');
+ var i;
+ for (i = 0; i < nodes.length; i++)
+ {
+ var dets = nodes[i].getElementsByTagName('div');
+ if (dets[0])
+ dets[0].style.display = 'none';
+ }
+
var body = document.getElementById('rec_' + id);
if (!body)
return;
function fetch_details(id)
{
cur_id = -1;
- var nodes = document.getElementsByName('listrecord');
- var i;
- for (i = 0; i < nodes.length; i++)
- {
- var dets = nodes[i].getElementsByTagName('div');
- if (dets[0])
- dets[0].style.display = 'none';
- }
if (id == cur_id)
{
cur_id = -1;
record_div.setAttribute('name', 'listrecord');
var record_cell = create_element('a', title);
- record_cell.setAttribute('href', '#');
+ record_cell.setAttribute('href', '#' + id);
record_cell.setAttribute('onclick', 'fetch_details(' + id + '); return false');
record_div.appendChild(record_cell);
if (author)