Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!