Jquery how to work with each index

0

I have a question about my Jquery, with this script I sent information to an email, the problem is that 11 emails are being sent to me with the different information, that's fine but what I want is that all this information is summarized in a single email, I have been recommended to make a condition with the index.

// Se enviara correo de notif. a Mantenimiento
var fecini  = "<%=fInicio%>";
var fecfin  = "<%=fTermino%>";
var func    = "normal";
var fechaNotif = "<%=fTermino%>";

$.ajax({
    async:false,    
    cache:false,   
    dataType:"html",
    type: 'POST',   
    url: "rep3_notificacion.asp",
    data: {
            fecini:fecini
          , fecfin:fecfin  
          , werks:centro          
          , stort:emplazamiento       
          , func:func           
    }, 
    success:  function(respuesta){  
        //$("#mostrarRep").html(respuesta);
        $.post("rep3_notificacion_email.asp", { werks:centro , stort:emplazamiento , tablas:contenidoCorreo, fechaNotif:fechaNotif }, function(data) {
          }).done(function() {
    // enviar mensaje de ejecucion correcta
            alert("Enviado correctamente");
          }).fail(function() {
         alert("Error al enviar correo");
      });
    },
    beforeSend:function(){},
    error:function(objXMLHttpRequest){}
});

 }
    
asked by Daniela 10.12.2018 в 21:16
source

0 answers