Ajax into fnFormatDetails function

Ajax into fnFormatDetails function

px10px10 Posts: 1Questions: 0Answers: 0
edited March 2014 in General
I have this code:

[code]
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );

$.post('php/clientes/clientes.php', {id:'details',ric:aData[2]} , function(respuesta) {

console.log(respuesta);

data = JSON.parse(respuesta);

var sOut = '';
sOut += 'Razón Social:'+data[0]+'';
sOut += 'CUIT:'+data[1]+'';
sOut += 'Dirección:' + data[2] + ' ' + data[3] + ', ' + data[6] + ', ' + data[5] + ', ' + data[4] + '.';
sOut += 'Codigo Postal:'+data[7]+'';
sOut += 'Coordenadas GPS:Latitud (' + data[8] + ') - Longitud (' + data[9] + ')';
sOut += '';
return sOut;
});
}
[/code]

My problem is, when I press the button "More details" the fnFormatDetails function is call, into the console log I can see information send by my PHP but these extra details is not displayed in my HTML.
This discussion has been closed.