Why is not working?
Why is not working?
Hey dudes, my english is very bad but i need help
Im using jquery UI autocomplete plugins with JSON data and its not working .... this is my code
- $("#txtCliente").autocomplete({
- dataType: 'JSON',
- source: function(request, response) {
- jQuery.ajax({
- url: "citas/acciones",
- type: "post",
- dataType: "json",
- data: {
- action: 'buscarCliente',
- cliente: request.term
- },
- success: function(data) {
- response(jQuery.map(data, function(item) {
- return {
- value: item.cal_nombre
- }
- }))
- }
- })
- }
- })
OK this work, the xhr request is send but the json data is not show in the textfield
- {"id_cliente":["29266","29267","29268","29269","29270","29271","29272","29273","29274","29275"],"cal_nombre":["EMILIO PUEBLA SORIANO","STEVEN ROTSTAIN ZIMMER","TEOBALDO CAVALCANTE LEAL","JORGE BELMONT AGUERO","PABLO ZIMMERMANN MUJICA","MARIO POTESTA MARTINEZ","MARIA MAYORGA VALDEZ","LUIS CADENA SARMIENTO","ENRIQUE PRADO LOPEZ DE ROMAÑA","RICARDO TEULLET PIPOLI"]}