I need to use the variable name equal the json post comeback data, then use jquery autocomplete, Can i do like that ? and why that error
var name=[];
$.post(url,{name:'name'},function(data){
getdata(data);
}
function getdata(data){
name=data;
}
$('#textbox').autocomplete({
source:name
})