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

128
Visualizações
Send multiple forms via JQuery with one button

I am making a website with ASP.NET Core 3.1 and I have a couple forms that are updating my database. Every row has their on form and every form has the class "dataFromMenu". I want one button that submits them all at the same time, I am using JS/JQuery to submit the forms, this is what Ive come up with:

function saveAllMenu() {
var temp = document.getElementsByClassName("dataFormMenu").length;

for (var i = 0; i < temp; i++) {
    document.getElementsByClassName('dataFormMenu')[i].submit();

    console.log(i);
}
}

When I run this nothing happens, If I switch the [i] to a 1 the first row gets switched and same for the others. But not with the [i], the console logs 0, 1, 2 on the button click.

Thanks beforehand! Best regards Max

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