summaryrefslogtreecommitdiffstats
path: root/htdocs/js/autocomplete.js
blob: 115ffba88ff68788d5ccd1f75449481d9716b82a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


function ac_keyup(input)
{
	input.autocomplete.keyup();
}

function AutoComplete(input)
{
	this.input = input;
	this.div = null;
	this.last_value = '';

	input.autocomplete = this;

	this.hide = function()
	{
		if (this.div) {
			this.div.style.display = 'none';
			this.div = null;
		}

	}

	this.show = function()
	{
		if (!this.div) {
			this.div = 

	this.keyup = function()
	{
		value = input.value;

		if (value == this.last_value)
			return;

		if (value.length < 3) {
			this.hide();
		}


}