custom filter in datatable server side
custom filter in datatable server side
gabrielfalieri
Posts: 4Questions: 3Answers: 0
Hello!
It has a certain time, I'm trying to make a type of custom filter on the server side of the datatable where I need to send parameters to the same.
I thought of two possibilities, first, use the fnserverdata, which I think did not work right and then I thought to send via ajax
This my ajax.
$("#btnFiltrar").click(function(){
if(document.getElementById("inputNao").checked){
var inputNao = $("input[id=inputNao]").val();
$.ajax({
type:'GET',
url:'json/ssp.class-license.php',
data:{
specialClientesYes:inputNao
}
})
}
});
$("#btnFiltrar").click(function(){
if($("#cmbVersao").find(":selected").text() != "Selecione"){
var versao = $("#cmbVersao").find(":selected").text();
$.ajax({
type:'GET',
url:'json/dados-license.php?version='+versao
})
}
});
$("#btnFiltrar").click(function(){
if($("#txtUsuariosDe").val() != ""){
var usuariosDe = $("#txtUsuariosDe").val();
$.ajax({
type:'GET',
url:'json/ssp.class-license.php',
data:{
earlyUsers:usuariosDe
}
})
}
});
My doubt is how to get this value sent on my server side and do it filter my query?
This discussion has been closed.
Answers
sorted out