9
Problem
My role is not waiting for the other to be finished so it can continue, for example:
Example:
function buscando_dados(){
$.post('ajax.php',{},function(dados){
alert(dados);
});
}
function buscar_dados(){
buscando_dados();
alert('prosseguindo'); //Prosseguindo está função sem esperar a outra acabar a requisição
}
I don’t know how to make for the alert('prosseguindo');
be executed only after the alert('dados');
and at the moment this is not happening.
How can I do that?
That’s a great question, why did she get negative? It helped me a lot, I can’t accept it. : S
– noNihongo
"anxious" is an adjective that cannot be assigned to a computer program, it is the same thing to have questions here with a title "Hopeful function" or "Confident function", it was not I who negatived but I believe I understand the reason.
– Tuyoshi Vinicius
Stop fighting, don’t be anxious.
– noNihongo
Why does this question have the tag [tag:php]?
– Luiz Vieira
@Luizvieira because he makes an ajax request for php
– Silvio Andorinha
Okay, but that’s not the point of the question, okay?
– Luiz Vieira
@Luizvieira right, I’ll take..
– Silvio Andorinha
I think it makes sense to take. I didn’t take because, after all, the question is yours. :)
– Luiz Vieira
Didn’t really need the php rs tag..
– Silvio Andorinha