3
I have an application that at the end of a page loading I make an AJAX request that takes around 20 seconds.
After this request my page keeps working normally so that when I try to make another AJAX request it waits for the first return the result to be executed later.
You can execute the second request without having to receive the result of the first?
Frontend
$.ajax({
url: '@Url.Action("NavegarNaEscala")',
method: 'post',
cache: false,
data: { escala: escala, direcao: direcao },
success: function (data) {
},
error: function () {
ExibirMensagem(1, "Ocorreu um erro ao navegar na escala.");
}
});
Backend
public JsonResult NavegarNaEscala(string escala, string direcao)
{...}
Put your code, @Igor Teixeira
– Thiago Thaison
By the browser developer tool (F12), in Network, you can identify asynchronous calls and be sure if one starts after the other or if one is expecting some resource from the other.
– Onaiggac