Vergleich jscripts/autocomplete.js - 1.2.0 - 1.2.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 8Zeile 8
		{
return false;
}

		{
return false;
}

		

 
		this.cache = new Array();

		this.cache = new Array();

	

 
		this.lastValue = '';
this.lastKeycode = 0;
this.textbox = $(textbox);

		this.lastValue = '';
this.lastKeycode = 0;
this.textbox = $(textbox);

 
		this.formSubmit = false;
this.url = url;

this.currentIndex = -1;
this.valueSpan = options.valueSpan;
this.urlParam = options.urlParam;
if(options.minChars)
{
this.minChars = options.minChars;
}
else
{
this.minChars = 3;
}
this.menuOpen = false;
this.timeout = false;

Event.observe(window, "load", this.init.bindAsEventListener(this));
},

init: function()
{

		this.textbox.setAttribute("autocomplete", "off");
this.textbox.autocompletejs = this;
Event.observe(this.textbox, "keypress", this.onKeyPress.bindAsEventListener(this));
Event.observe(this.textbox, "keyup", this.onKeyUp.bindAsEventListener(this));
Event.observe(this.textbox, "keydown", this.onKeyDown.bindAsEventListener(this));

		this.textbox.setAttribute("autocomplete", "off");
this.textbox.autocompletejs = this;
Event.observe(this.textbox, "keypress", this.onKeyPress.bindAsEventListener(this));
Event.observe(this.textbox, "keyup", this.onKeyUp.bindAsEventListener(this));
Event.observe(this.textbox, "keydown", this.onKeyDown.bindAsEventListener(this));

		this.formSubmit = false;

 
		if(this.textbox.form)
{
if(this.textbox.form.onsubmit)

		if(this.textbox.form)
{
if(this.textbox.form.onsubmit)

Zeile 30Zeile 49
			this.textbox.form.onsubmit = this.onFormSubmit.bindAsEventListener(this);
}
this.textbox.onsubmit = this.onFormSubmit.bindAsEventListener(this);

			this.textbox.form.onsubmit = this.onFormSubmit.bindAsEventListener(this);
}
this.textbox.onsubmit = this.onFormSubmit.bindAsEventListener(this);

		this.url = url;

this.currentIndex = -1;
this.valueSpan = options.valueSpan;
this.urlParam = options.urlParam;
if(options.minChars)
{
this.minChars = options.minChars;
}
else
{
this.minChars = 3;
}
this.menuOpen = false;

 
		this.popup = document.createElement("div");
this.popup.style.position = "absolute";
this.popup.className = "autocomplete";
this.popup.style.display = "none";
document.body.appendChild(this.popup);

		this.popup = document.createElement("div");
this.popup.style.position = "absolute";
this.popup.className = "autocomplete";
this.popup.style.display = "none";
document.body.appendChild(this.popup);

		
this.timeout = false;

 

this.textbox.popup = this;



this.textbox.popup = this;