6

How do I fire another event after I have completed the selection on the textbox that has autocomplete. I want to show a valid div area based on the selected value.

2 Answers 2

6

Assuming you're talking about jQuery UI autocomplete, then like this:

$('#autocomplete').result(function(event, data, formatted) {
  alert('Someone picked a suggestion from the drop-down');
});

That is to say, the "result" method fires.

See http://docs.jquery.com/UI/Autocomplete/autocomplete#options

Sign up to request clarification or add additional context in comments.

Comments

1
function change() {
  document.getElementById('<%=btnLoadBenefits.ClientID %>').click();
}

<asp:Button ID="btnLoadBenefits" runat="server" OnClick="btnLoadBenefits_Click" style="display:none;"/>    

<asp:TextBox ID="txtCompanyname" runat="server" Width="220px" Height="18px"                                                                                                MaxLength="50" onchange="change();">
</asp:TextBox>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.