Uncaught Typeerror: Object Has No Method Autocomplete And Its Blocking To Populate Dialogue Box To Delete In Yii

I’m sorry similar post is already there in the community, But i’m finding it strange. Its working fine but it affected my other views and not allowing other view pages to populate any dialogue boxes…

I tried to fix it by wrapping it in function() like this


But, with this i’m not getting jason values in the _auto textfield and getting unexpected token error with following line.

can anyone help me to solve this please.

source: function(request,response){

this is my code:

$(function () {


			selectFist: true,

			minLength: 2,

			source: function (request, response) {

				var sval = $('#_auto').val();



					url: BASE_URL + '/controller/search/',

					type: 'POST',

					data: {

						'term': sval,


					dataType: 'json',

					success: function (data) {


						var dta = [];

						orgdetails = [];


						for (var i in data) {


							orgdetails[data[i].name] = data[i].id;


						response(dta); //response(dta);


					error: function (result) {}

				}); //ajax


		}).focus(function () {




Many Thanks