I'm trying to recover some long data from the server. In paralel I have another request (PHP) that runs once per 5 seconds.
Function that runs more than one time:
var monitor = setInterval(monitorar, 5000);
function monitorar(){
$.get('ferramentas/monitor.php').done(function(data){
$("#conteudo").html(data);
});
}
Function that run just one time:
function buscar_dados(){
$.post('ferramentas/login_sistema.php', function(data){
console.log(data);
});
}
The problem is that the div #conteudo doesn't receive any data until the second function ends. Than everything blows up in the div. Can I receive the request of the first function in parallel?