My AutoCompleteExtender is connected to a web service and works perfectly. The Target TextBox (tb_provider1) has autocomplete capabilities thanks to the GetProviders function. What I want to achieve is triggering a javascript function when a user selects an option from the autocomplete list of the TextBox (tb_provider1). I have utilized OnClientItemSelected and everything works fine in IE9. Below is the ASPX code snippet:
<asp:AutoCompleteExtender ID="AutoComplete1"
runat="server" ServiceMethod="GetProviders"
ServicePath="AutoCompleteWebService.asmx" OnClientItemSelected="ProviderSelectedFunc"
TargetControlID="tb_provider1" CompletionSetCount="20"
CompletionInterval="250" CompletionListCssClass="CompletionListCssClass"
CompletionListItemCssClass="CompletionListItemCssClass"
CompletionListHighlightedItemCssClass="CompletionListHighlightedItemCssClass">
Here is the javascript function:
function ProviderSelectedFunc(sender, args) {
//here I know I am sending in tb_enrollingProvider1
var temp = sender._id.toString();
if (temp.substr(-14,13))
alert("Testing");
}
The alert fires in IE9 but not in IE7 or IE8. Need help with this issue.