|
function ClientPopulated(source, eventArgs)
{
if (source._currentPrefix != null)
{
var list = source.get_completionList();
var search = source._currentPrefix.toLowerCase();
for (var i = 0; i < list.childNodes.length; i++)
{
var text = list.childNodes[i].innerHTML;
var index = text.toLowerCase().indexOf(search);
if (index != -1)
{
var value = text.substring(0, index);
value += '<span class="AutoComplete_ListItemHiliteText">';
value += text.substr(index, search.length);
value += '</span>';
value += text.substring(index + search.length);
list.childNodes[i].innerHTML = value;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have been coding web applications since 2001. Starting with classic .asp and rolling from there, I have a passion for user interface design and building zero-training applications.