my application is asp.net MVC3. I am using Telerik MVC combobox; I need to highlight a specific word in the dropdownlist, here is my script:
highlightText(document.getElementById('Cword').value);
function highlightText(htext) {
var str = document.getElementById("ComboBox-input").innerHTML;
str = str.replace(htext, '<span style="color:blue;">' + htext + '</span>');
document.getElementById("ComboBox-input").innerHTML= str;
}
Unfortunately it did not work, I check same script on a div and it worked. I would appreciate your suggestions, thanks in advance.