I have this Ajax
which makes me an update, and I will pass it on so that I can delete the content that is checked,
My mistake is that I also have to remove from the general table which I do not know how to remove it.
This is the ajax
$(function() {
$('#btn-analisisInt').click(function() {
var lineasPreajuste= [];
$('#contTabla2 input:checked').closest("tr").each(function() {
// var linea= {
articulo = $(this).find(".articulo").text();
ubicacion = $(this).find(".ubicacion").text();
ovs = $(this).find(".ovs").text();
ufisica = $(this).find(".ufisica").text();
existencia = +$(this).find(".existencia").text();
//existencia = existencia.toFixed(3);
cantidadC = +$(this).find(".cantidadC").text();
//cantidadC = cantidadC.toFixed(3);
resultDif = +$(this).find(".resultDif").text();
//resultDif = resultDif.toFixed(3);
promedio = +$(this).find(".promedio").text();
//}
//lineasPreajuste.push(linea);
$.ajax({
url: 'http://localhost:3000/Preajustes',
method: 'post',
data:{
articulo: articulo,
ubicacion: ubicacion,
ovs: ovs,
ufisica: ufisica,
existencia: existencia,
cantidadC: cantidadC,
resultDif: resultDif,
promedio: promedio
},
success: function(response){
console.log(response);
$('.case:checked').eq(0).parent().parent().remove()
swal({
title: "Se traslado correctamente el articulo a preajuste.",
text: "",
timer: 2000,
showConfirmButton: false
});
}
});
});
});
});
As shown in the image I am only able to erase what is in the modal but I am not able to erase it from the general table. Everything happens when I hit the Preset button.