1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
// DEBUT CLICK BOUTON SUPPRIMER
$(document).on("click", "#BtnSuppr", function (e){
var id = "<?php echo $id;?>";
var NumInt = $("#tabGauche").closest("tr").find("td:eq(0)").text();
var NomDoc = globNDoc;
var Type = "";
for($i=0;$i<5;$i++)
{
if($("#selectFax").val()==ValOption[$i])
{
var Option = ValOption[$i];
TypeDoc = "fax";
}
if($("#selectMail").val()==ValOption[$i])
{
var Option = ValOption[$i];
TypeDoc = "mail";
}
}
if(TypeDoc == "mail"){
var DateCreat = $(this).closest("tr").find("td:eq(7)").text();
var Destinataire = $(this).closest("tr").find("td:eq(1)").text();
var Expediteur = $(this).closest("tr").find("td:eq(0)").text();
var HeureCreat = $(this).closest("tr").find("td:eq(8)").text();
var TypeImp = $(this).closest("tr").find("td:eq(2)").text();
}
else{
var DateCreat = $(this).closest("tr").find("td:eq(7)").text();
var NumFax = $(this).closest("tr").find("td:eq(2)").text();
var HeureCreat = $(this).closest("tr").find("td:eq(8)").text();
var TypeImp = $(this).closest("tr").find("td:eq(3)").text();
}
$.ajax({
"url":"SupprFax.php",
"type":"POST",
"data":{
"DateCreat": DateCreat, "Destinataire": Destinataire, "Expediteur": Expediteur, "NumFax": NumFax, "HeureCreat": HeureCreat, "id": id, "NomDoc": NomDoc, "NumInt": NumInt, "TypeDoc": TypeDoc, "TypeImp": TypeImp
},
"dataType":"json",
"success":function(data){
}
});
// $("#tabGauche").closest("tr").fadeOut("slow");
$(this).closest("tr").fadeOut("slow");
$("#NumInt").trigger("change");
});
// FIN CLICK BOUTON SUPPRIMER |
Partager