$('#myform').serialize() send to server
$('#myform').serialize() send to server
Massimo74
Posts: 85Questions: 1Answers: 0
hi I would like to pass to the server
var $FormData = $('#myform').serialize();
to get the dataset for the table.
better to use: fnServerData o fnServerParams
Thanks.
This discussion has been closed.
Replies
In this post you see how to post a variable to the server using Editor with data tables:
https://datatables.net/forums/discussion/60000/ext-search-push-not-working-with-serverside#first
Search for "startDateExpired" on that page.
sorry for a question, but if I extract the data first can I then convert it to a dataset?
es:
$.ajax ({
url: "php/report_pro.php",
data: $("#tb_report_pro").serialize(),
type: "POST",
success: function(result){
$dataset = JSON.parse(result);
data : $dataset
})
nb: in result comes
[{"dat":"03\/12\/2019","id_art":"1029","id_Lav":"1","id_Cat":"1","id_Col":"8","id_PC":null,"id_Mat":"1","id_Dif":"4","id_Cli":null,"Qta":"32","Cod_Art":"1246036","DArt":"LAVABO COOL CM 50 INDACO","DLav":"Prima Cottura","DCat":"Lavabo","DCol":"Indaco","DPc":null,"DM":"Fire Clays","DDif":"Macchie Ferro","DCli":null}]
ok solved.
Thanks