Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

72
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda