Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
Uncaught (in promise) TypeError: $(...).submit(...).then is not a function when making an API call

I have a link which submits a POST request, and it was functioning well until I made some changes to my code, which as far as I'm aware have no bearing on this particular function. However, when I click my button I then receive the following error in console, and despite having looked into it, I'm not so sure how to rectify this, as it was working previously. I'd also like to understand the cause more.

Uncaught (in promise) TypeError: $(...).submit(...).then is not a function

In reference to this code:

$("#bugForm").submit((e) => {
        e.preventDefault()
        const input = document.getElementById('nameInput');
        bugInfo = {
          "name": `[${idTicket}] Bug report`,
          "story_type" : "Bug",
          "description": `+ ${data.ticket.brand.url}/agent/tickets/${idTicket}` + " \n" + `+ ${input.value}`,
        }
        reportBug(bugInfo).then(collapse.collapse('toggle'))
      }).then(() => {

        clearFields();
      })
    });
  });
});

HTML:

<form id="bugForm" method="POST">
      <textarea class="form-control" name="name" autocomplete="off" id="nameInput" rows="2"></textarea>
      <div id="sendbutton">
        <button type="submit" id="feedback-button" onclick="changeSecond();" class="btn btn-primary float-right">Send message</button>
      </div>
    </form>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda