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

69
Views
Jquery loop post requests

I have a question regarding jquery and javascript post request loop.

I am quite new to javascript, so i need help to creating a post loop.

I have this: User input field: x@x.com;y@y.com (the user can specify emails divided by semicolon.

Right now i have this:

<button id="sendwebhook">Send</button>
<script>
    $(document).ready(function() {
  $('#sendwebhook').click(function() {
    $.ajax({
      
url: "https://somesite.com/...",
      type: "POST",
      data: JSON.stringify(
        {  "email":"x@x.com" }
      ),
      complete: function(){     alert("Success")        }
    });
  });
});
    
</script>  

What i want to do is send a post request per email in the input field. So in this case i want to send this:

{  
"email":"x@x.com" 
},
{  
"email":"y@y.com" 
}

Or make two post requests with one json string. The user should be able to insert an unlimited amounth of emails, so i should be some kind of loop.

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!