jquery autocomplete with json response -
im receiving feedback in json, but this does not parse Jason's response. What am i doing wrong I can not find anything at the doctor
$ ("# user-permissions"). Autocomplete ("/ people / following .json", {width: 320, // maximum: 4, highlights: false, scroll: true, scrollwhite: 300, formatITIM: function (feedback, eye, max) {console.log ( Response; console.log (feedback ['item']); console.log (response.items); I + "/" + max + "return: \" "+ response.status_code +" \ "[" + response .status_description + "]" // return "
$ ("# user-permissions"). Autocomplete (" / People / following .json ", {width: 320, data type: 'jason', highlights: false, scroll: true, scrollwise: 300, pars: function (data) {var array = new array (); for ( Var i = 0; i & lt; data.items.length; i ++) {array [array.length] = {data: data.items [i], value: data. Items [i], results: data. Items [i]. Username);} Return Array;}, formatItem: Function (line) {var name = ''; If (row.first_name & row.last_name) name = '(' + row.first_name + ',' + row.last_name + ') ;; Else if (row.first_name) name = '(' + row.first_name + ') ;; Else if (row.last_name) name = '(' + row.last_name + ')'; Return line.use + + '+ + name;}});
Check the data type and parse option.
Comments
Post a Comment