The problem is that sometimes the query runs out of time or gives a real error, so I want to automate it.
$.ajax({
type: "GET",
url: 'inserindodados.prisma',
data: $('#FormularioDescoberta').serializeArray(),
dataType: "json",
success: function(sucesso){
// Beleza deu certo!
}
error: function(erro){
// Tente novamente
}
});