13 |
document.myfilter = new BFilter(headlines); |
document.myfilter = new BFilter(headlines); |
14 |
|
|
15 |
document.myfilter.result = function (arr) { |
document.myfilter.result = function (arr) { |
16 |
|
var r = element_id('results'); |
17 |
|
if (r) { |
18 |
|
var e = document.createElement("a"); |
19 |
|
e.setAttribute("href","thes/"+arr[1]+".html"); |
20 |
|
//e.setAttribute("target","_blank"); |
21 |
|
e.appendChild(document.createTextNode(arr[0])); |
22 |
|
r.appendChild(e); |
23 |
|
|
24 |
|
r.appendChild(document.createTextNode(" ")); |
25 |
|
|
26 |
|
e = document.createElement("a"); |
27 |
|
e.setAttribute("href","browse.html?o="+arr[1]); |
28 |
|
e.appendChild(document.createTextNode(">>")); |
29 |
|
r.appendChild(e); |
30 |
|
|
31 |
|
r.appendChild(document.createElement("br")); |
32 |
|
|
33 |
|
return null; |
34 |
|
} else { |
35 |
|
alert("can't find results div!"); |
36 |
|
} |
37 |
|
/* |
38 |
return '<li><a href="thes/'+arr[1]+'.html">'+arr[0]+'</a>'+ |
return '<li><a href="thes/'+arr[1]+'.html">'+arr[0]+'</a>'+ |
39 |
' <a href="browse.html?o='+arr[1]+'">¤</a>' + |
' <a href="browse.html?o='+arr[1]+'">¤</a>' + |
40 |
'</li>'; |
'</li>'; |
41 |
|
*/ |
42 |
} |
} |
43 |
|
|
44 |
// this function is called when updating innerHTML with results |
// this function is called when updating innerHTML with results |
45 |
document.myfilter.display = function (html) { |
document.myfilter.display = function (html) { |
46 |
return '<ul>'+html+'</ul>'; |
return null; |
47 |
|
// return '<ul>'+html+'</ul>'; |
48 |
} |
} |
49 |
} |
} |
50 |
|
|