Click here to Skip to main content
15,851,915 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi all,
I have an jquery autocomplete and which select membername with their id. I am getting the selected member id when select event is called like below:

//For autocomplete extender generating members
    $(function () {
                //make ajax call to get all members
                source: function (request, response) {
                select: function (event, ui) {
                        self.selectedMemberId(ui.item.value); //selected memberid
            .keypress(function (e, data, ui) {
            if (e.which == 13) {
            //selected memberid when pressing enter key
            //self.selectedMemberId(ui.item.value); //selected memberid

As in select event i am getting id of member, i want to get memberId in keypress event of autocomplete.
Updated 1-Feb-13 2:37am

1 solution

replace keypress with change event
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900