0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'getClientRects' while use jquery autocomplete

0

This is my JQuery

$(document).ready(function () {

$("#txtId").autocomplete({
                source: function (request, response) {
                    $.ajax({
                        type: "POST",
                        url: '@Url.Action("ActionName", "Controller")',
                        dataType: 'json',
                        data: "{ 'mode': 'mode','prefix': '" + request.term + "' }",
                        contentType: "application/json;charset=utf-8",
                        success: function (data) {
                            var transformed = $.map(data, function (item) {
                                return item.Name;
                            });
                            response(transformed);
                        },
                        error: function() {
                            alert('error loading');
                        },
                    });
                },
            });
});

I get the error only when the "response(transformed);" is used. I have included all the required scripts, firstly jquery and next jquery-ui.js . I have included this in the bundle config. How should I resolve this error, I cam across lot of solutions stating that jquery.js or jquery-ui.js would not be loaded. But in my case both are loaded correctly. Can some one help me out on this?

javascript
jquery
jquery-ui
asked on Stack Overflow Nov 1, 2019 by Sam Daniel

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0