I have this:
function FilterSelect(select, search) {
this.select = select;
this.search = search;
// Get the current list options
this.options = this.select.options;
// Whenever the text of the search box changes, do this
this.search.onkeyup = function() {
// Clear the list
while(this.select.options.length > 0) {
this.select.remove(0);
}
}
}
Inside of the onkeyup function I would like to access select, but I know it is not possible as is. What is the proper way to do this?
this.search.select = this.selectas the third line of your function.