| 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.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.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);
|