I'm trying to get an answer to see if the PHPExcel PHPExcel file already downloaded, and then proceed with my algorithm.
I tried to put in the phpexcel file the following line before the exit;
echo json_encode(array("teste" => 1));
But it does not work. It returns as undefined
$.ajax({
type : 'post',
url : 'services/'+url,
data : {
data : competencia
},
success: function (data) {
if(data.teste === 1)
alert('baixou');
else
alert('nao baixou: '+data.teste);
}
});