запросы идут на
$('#users-add input[name=q]').autocomplete(site_domain + '/ajax/company-users/', {
возвращается вот такое дело:
[{"id":"1","email":"[email protected]","password":"ca62568ba68d0413a78006a4c3f1517b","company_id":"1","name":"user1","company_admin":"1","projects":"1","deleted":"0","phone":"+7"},{"id":"2","email":"[email protected]","password":"ca62568ba68d0413a78006a4c3f1517b","company_id":"1","name":"user2","company_admin":"0","projects":"0","deleted":"0","phone":"+7"}]
если это скопировать в переменную например вот так:
var es = [{"id":"1","email":"[email protected]","password":"ca62568ba68d0413a78006a4c3f1517b","company_id":"1","name":"user1","company_admin":"1","projects":"1","deleted":"0","phone":"+7"},{"id":"2","email":"[email protected]","password":"ca62568ba68d0413a78006a4c3f1517b","company_id":"1","name":"user2","company_admin":"0","projects":"0","deleted":"0","phone":"+7"}];
$('#users-add input[name=q]').autocomplete(es, { …
то работает, а через ajax не пашет…
возвращаемые данные в переменную скопировал из файрбага..
есть мнения?