filtering ListBox according to input value
<p>Javascript</p>

<pre><code>  &lt;script type="text/javascript"&gt;
     //note that you would put these functions in a library .js that you include on every page
     //the jQuery default contains function is case-sensitive  //this declaration creates a new Contains function that's case-insensitive
    jQuery.expr[':'].Contains = function (a, i, m) {
        return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) &gt;= 0;
    };
    var Util = new Object();
    //just a namespace object  
    //the original YUI DataTable filter function  
    Util.yuiDtFilter = function (tableDivId, filter) {
        $("#" + tableDivId + " .yui-dt-data").find('tr').hide();
        $("#" + tableDivId + " .yui-dt-data").find('td:Contains("' + filter + '")').parents('tr').show();
    }
    //slightly modified version of the above to work on any table with a tbody 
    Util.tableFilter = function (tableBodyId, filter) {
        $("#" + tableBodyId).find('tr').hide();
        $("#" + tableBodyId).find('td:Contains("' + filter + '")').parents('tr').show();
    }
    //this one works on any &lt;select&gt; list  
    Util.selectFilter = function (selectId, filter)
    { $("#" + selectId).find('option').hide(); $("#" + selectId).find('option:Contains("' + filter + '")').show(); }
&lt;/script&gt;
</code></pre>

<p>Asp.Net controls</p>

<pre><code>   &lt;input type="text" onkeyup="Util.selectFilter('copyUserListBox', this.value)" style="width: 300px"
                            value="Enter a text..." /&gt;
                        &lt;br /&gt;
   &lt;asp:ListBox ID="copyUserListBox" runat="server" Width="300px" Height="200px"&gt;&lt;/asp:ListBox&gt;
</code></pre>

<p>I'm filtering ListBox accordding to input value. In Firefox, Chrome, it works correctly but in IE it doesn't work. How to do this?</p>
