jQuery Autocomplete iwith ASP.Net WebService AJAX call and multiple value selection
I'm trying to consume a Webservice call in an ASP.Net to fill an autocomplete input with jquery dynamically regardless the input (ie: i get the input id onfocus and set the database name through this).

Here is my code:

   

            var param;
            $('input[type=text]').focus(function () {
                param = $(this);
                $.ajax({
                    type: 'POST',
                    data: '{"param":"' + param.attr('title') + '"}',
                    url: 'services/service.asmx/autocompleteData',
                    dataType: 'json',
                    contentType: 'application/json;charset=utf-8',
                    success: function (data) {
                        var _data = data.d.split(':');
                        param.bind('keydown', function (event) {
                            if (event.keyCode === $.ui.keyCode.TAB && param.data('autocomplete').menu.active) {
                                event.preventDefault();
                            }
                        }).autocomplete({
                            source: function (request, response) {
                                response($.ui.autocomplete.filter(_data, extractLast(request.term)));
                            },
                            focus: function () {
                                return false;
                            },
                            minLength: 0,
                            select: function (event, ui) {
                                var terms = split(this.value);
                                terms.pop();
                                terms.push(ui.item.value);
                                terms.push("");
                                this.value = terms.join(', ');
                                return false;
                            }
                        });
                    }
                });
            });


through this, im trying to select multiple values from the dropdown list, but unfortunately my list only opens on the first selected value, but doesnt open for other values.

i would like to know if theres something im doing wrong. thanks
jQuery Autocomplete iwith ASP.Net WebService AJAX call and multiple value selection
===

I'm trying to consume a Webservice call in an ASP.Net to fill an autocomplete input with jquery dynamically regardless the input (ie: i get the input id onfocus and set the database name through this).

Here is my code:

   

            var param;
            $('input[type=text]').focus(function () {
                param = $(this);
                $.ajax({
                    type: 'POST',
                    data: '{"param":"' + param.attr('title') + '"}',
                    url: 'services/service.asmx/autocompleteData',
                    dataType: 'json',
                    contentType: 'application/json;charset=utf-8',
                    success: function (data) {
                        var _data = data.d.split(':');
                        param.bind('keydown', function (event) {
                            if (event.keyCode === $.ui.keyCode.TAB && param.data('autocomplete').menu.active) {
                                event.preventDefault();
                            }
                        }).autocomplete({
                            source: function (request, response) {
                                response($.ui.autocomplete.filter(_data, extractLast(request.term)));
                            },
                            focus: function () {
                                return false;
                            },
                            minLength: 0,
                            select: function (event, ui) {
                                var terms = split(this.value);
                                terms.pop();
                                terms.push(ui.item.value);
                                terms.push("");
                                this.value = terms.join(', ');
                                return false;
                            }
                        });
                    }
                });
            });


through this, im trying to select multiple values from the dropdown list, but unfortunately my list only opens on the first selected value, but doesnt open for other values.

i would like to know if theres something im doing wrong. thanks