I have a call through ajax that returns me an answer, what I want to do is, for example there are times when the answer takes a long time and in these cases I would like to put a message that says something like that your request took longer than allowed, for example that this message appears after 20 seconds
I pass my code of the request thank you:
function generarnombre(){
$("#cargando").css("display", "inline");
$.ajax({
type : "POST",
url : "reniec.php",
data : $("#fromulariof1").serialize(),
success : function(data){
$("#resultado_reniec").html(data);
$("#cargando").css("display", "none");
}
})
return false;
}