I\'m using DataTable.js to showing the data and I have some
ok i fixed the event inactive on other row [old] [new] option in my
and DataTable are showing the 10 frist row with defa
but these an other probleme is the event are duplicate $("select[name='type']").change(function(){
var type_req = $(this).val();
var id = $(this).closest('tr').find('td#id_commande').html();
var action ="update";
var action_infos = "type_req";
console.log("change event active");
console.log(type_req);
console.log(id);
$.ajax({
type: "POST",
url: "../controllers/commandeController.private.php",
data:{id:id ,action : action ,action_infos : action_infos ,type : type_req},
success:function(){toastr.success("Modification commande réussi")},
error:function(){toastr.error("Modification commande impossible")},
});
});
$('table[name="commandeTable"]').on("click",function(){
$("select[name='type']").change(function(){
var type_req = $(this).val();
var id = $(this).closest('tr').find('td#id_commande').html();
var action ="update";
var action_infos = "type_req";
console.log("change event active");
console.log(type_req);
console.log(id);
$.ajax({
type: "POST",
url: "../controllers/commandeController.private.php",
data:{id:id ,action : action ,action_infos : action_infos ,type : type_req},
success:function(){toastr.success("Modification commande réussi")},
error:function(){toastr.error("Modification commande impossible")},
});
});
});