1 |
dpavlin |
11 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 |
|
|
<HTML> |
3 |
|
|
<HEAD> |
4 |
|
|
<TITLE> New Document </TITLE> |
5 |
|
|
|
6 |
|
|
<style type="text/css"> |
7 |
|
|
#textfilterholder { |
8 |
|
|
border:1px black solid |
9 |
|
|
padding:0px; |
10 |
|
|
width:200px; |
11 |
|
|
} |
12 |
|
|
#filterholder { |
13 |
|
|
position:relative; |
14 |
|
|
} |
15 |
|
|
|
16 |
|
|
#textfilter { |
17 |
|
|
width:175px; |
18 |
|
|
font-size:12px; |
19 |
|
|
border: 0px black solid |
20 |
|
|
height:20px; |
21 |
|
|
} |
22 |
|
|
#sel { |
23 |
|
|
width:200px; |
24 |
|
|
font-size:12px; |
25 |
|
|
} |
26 |
|
|
#results { |
27 |
|
|
z-index:100; |
28 |
|
|
border: 0px black solid; |
29 |
|
|
width:200px;; |
30 |
|
|
position:absolute; |
31 |
|
|
top:20px; |
32 |
|
|
left:0px; |
33 |
|
|
} |
34 |
|
|
#status { |
35 |
|
|
z-index:10; |
36 |
|
|
} |
37 |
|
|
</style> |
38 |
|
|
|
39 |
|
|
|
40 |
|
|
<script type="text/javascript" src="bfilter.js"></script> |
41 |
|
|
<script type="text/javascript"> |
42 |
|
|
|
43 |
|
|
var headlines = new Object(); |
44 |
|
|
headlines['ad'] = [ |
45 |
|
|
['thes/232.html','adacta'] |
46 |
|
|
, ['thes/232.html','added'] |
47 |
|
|
, ['thes/232.html','addenda'] |
48 |
|
|
, ['thes/232.html','adlib'] |
49 |
|
|
]; |
50 |
|
|
|
51 |
|
|
headlines.min_len = 2; |
52 |
|
|
headlines.length = 4; |
53 |
|
|
|
54 |
|
|
function myfilter() { |
55 |
|
|
document.getElementById('textfilter').focus(); |
56 |
|
|
document.getElementById('textfilter').caretPos=1; |
57 |
|
|
// document.getElementById('textfilter').select(); |
58 |
|
|
document.myfilter = new BFilter(headlines); |
59 |
|
|
|
60 |
|
|
document.myfilter.html_pre = '<option value="'; |
61 |
|
|
document.myfilter.html_mid = '">'; |
62 |
|
|
document.myfilter.html_post = '</option>'; |
63 |
|
|
document.myfilter.html_full_pre = '<select id="sel" size="5" onkeydown="if (event.keyCode==13) document.getElementById(\'textfilter\').focus();" onchange="document.getElementById(\'textfilter\').value = this.options[this.selectedIndex].text;">'; |
64 |
|
|
document.myfilter.html_full_post = '</select>'; |
65 |
|
|
} |
66 |
|
|
|
67 |
|
|
function keypress(e) { |
68 |
|
|
var d = e.keyCode; |
69 |
|
|
if ((d == 37) || (d == 38) || (d == 39) || (d == 40)) { |
70 |
|
|
if (document.getElementById('sel')) document.getElementById('sel').focus(); |
71 |
|
|
} |
72 |
|
|
} |
73 |
|
|
|
74 |
|
|
</script> |
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
</HEAD> |
80 |
|
|
|
81 |
|
|
<BODY onload="myfilter();"> |
82 |
|
|
|
83 |
|
|
<div id="filterholder"> |
84 |
|
|
<div id="textfilterholder"><input autocomplete="off" id="textfilter" name="textfilter" type="text" onkeyup="document.myfilter.filter(document, this.value, headlines);" onKeyDown="keypress(event);" value=""></div> |
85 |
|
|
|
86 |
|
|
<div id="results"> |
87 |
|
|
</div> |
88 |
|
|
|
89 |
|
|
<div id="status"> |
90 |
|
|
</div> |
91 |
|
|
|
92 |
|
|
</div> |
93 |
|
|
|
94 |
|
|
|
95 |
|
|
Text |
96 |
|
|
|
97 |
|
|
</BODY> |
98 |
|
|
</HTML> |