/[bfilter]/trunk/combo.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/combo.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by dpavlin, Tue Sep 14 22:55:40 2004 UTC revision 25 by dpavlin, Wed Sep 15 15:30:04 2004 UTC
# Line 61  function combo_onKeyDown(event) { Line 61  function combo_onKeyDown(event) {
61  function myfilter() {  function myfilter() {
62    
63          document.getElementById('textfilter').focus();          document.getElementById('textfilter').focus();
64  document.getElementById('textfilter').caretPos=1;          document.getElementById('textfilter').caretPos=1;
65  //      document.getElementById('textfilter').select();  //      document.getElementById('textfilter').select();
66          document.myfilter = new BFilter(headlines);          document.myfilter = new BFilter(headlines);
67            
68          document.myfilter.html_pre = '<option value="';          document.myfilter.result = function (arr) {
69          document.myfilter.html_mid = '">';                  return '<option value="'+arr[1]+'">'+
70          document.myfilter.html_post = '</option>';                          arr[0] +
71          document.myfilter.html_full_pre = '<select id="sel" size="5" onKeyDown="combo_onKeyDown(event);" onChange="document.getElementById(\'textfilter\').value = this.options[this.selectedIndex].text;">';                          '</option>';
72          document.myfilter.html_full_post = '</select>';          }
73    
74            // this function is called when updating innerHTML with results
75            document.myfilter.display = function (html) {
76                    return '<select id="sel" size="5" onKeyDown="combo_onKeyDown(event);" onChange="document.getElementById(\'textfilter\').value = this.options[this.selectedIndex].text;">'+html+'</select>';
77            }
78  }  }
79    
80  function combo_filter(document,value) {  function combo_filter(document,value) {
81    
82          if (! combo_active) {          if (! combo_active) {
83                  return;                  return null;
84          }          }
85    
86          return document.myfilter.filter(document, value, headlines);          return document.myfilter.filter(document, value, headlines);

Legend:
Removed from v.24  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26