I have an AutoCompleteExtender that calls a web service. The AutoCompleteExtender works well and the Target TextBox (tb_provider1) has autocomplete functionality from the GetProviders function. I would like to call a javascript function upon selection of the autocomplete text of the TextBox (tb_provider1). I have used the OnClientItemSelected and the call is done correctly in IE9. Here is ASPX code:
<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">
And here is the javascript
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");
}
In IE9, the alert fires. In IE7/IE8 nothing happens. Any help?