Ajax giving error 302

0

I'm calling the same JavaScript functions in distinct forms on the same page.

When I call the function of the first form, the function that runs an ajax normally runs.

When calling the same function on the second form, ajax does not execute by returning error 302 Moved Temporarily.

I'm breaking my head to know the reason for the error and so far I have not been able to figure out why calling the function in the first form works normally without error.

Problem is being executed in the second flame in the second form, and in that second form it calls the function in the same way as the first form.

$.ajax({
          url: "/busca.php",
          type:"POST",
          data: { "valor": valor, "combo" : combo, "categoria" : categoriab, "estado" : estadob, "cidade" : cidadeb, "bairro" : bairrob, "etapa" : etapa},
          cache: false,
          success: function(response) {
              var resultado = JSON.parse(response);                    
              $("#"+resultado.etapa+"").html(resultado.combo);             
          },
          error: function() {
              alert(" Não foi possível completar a solicitação! ");
          },
          complete: function() {
              //direcionar para algum lugar                    
          } 
      });
    
asked by anonymous 03.02.2017 / 14:15

0 answers