--- trunk/combo.html 2004/09/24 15:44:27 29 +++ trunk/combo.html 2004/09/24 16:58:08 30 @@ -46,10 +46,10 @@ function combo_onKeyDown(event) { //debug("event: "+event.keyCode); if (event.keyCode == 13) { - var el = document.myfilter.element_id('textfilter'); + var el = self.document.myfilter.element_id('textfilter'); if (el) el.focus(); - el = document.myfilter.element_id('results'); + el = self.document.myfilter.element_id('results'); if (el) el.innerHTML = ''; combo_active = 0; @@ -60,12 +60,12 @@ function myfilter() { - document.getElementById('textfilter').focus(); - document.getElementById('textfilter').caretPos=1; -// document.getElementById('textfilter').select(); - document.myfilter = new BFilter(headlines); + self.document.getElementById('textfilter').focus(); + self.document.getElementById('textfilter').caretPos=1; +// self.document.getElementById('textfilter').select(); + self.document.myfilter = new BFilter(headlines); - document.myfilter.result = function (arr) { + self.document.myfilter.result = function (arr) { this.results_html += ''; @@ -73,24 +73,24 @@ } // this function is called when updating innerHTML with results - document.myfilter.display = function () { - return ''; + self.document.myfilter.display = function () { + return ''; } } -function combo_filter(document,value) { +function combo_filter(value) { if (! combo_active) { return null; } - return document.myfilter.filter(document, value, headlines); + return self.document.myfilter.filter(value); } function keypress(e) { var d = e.keyCode; if ((d == 37) || (d == 38) || (d == 39) || (d == 40)) { - if (document.getElementById('sel')) document.getElementById('sel').focus(); + if (self.document.getElementById('sel')) self.document.getElementById('sel').focus(); } if (d != 13) combo_active = 1; @@ -109,7 +109,7 @@