function SearchList() { var l = document.getElementById("<%= LBox.ClientID %>"); var tb = document.getElementById("<%= txtDepartments.ClientID %>"); if (tb.value == "") { ClearSelection(l); } else { for (var i = 0; i < l.options.length; i++) { if (l.options[i].value.toLowerCase().match(tb.value.toLowerCase())) { l.options[i].selected = true; return false; } else { ClearSelection(l); } } } } function ClearSelection(l) { l.selectedIndex = -1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)