I need buil one system for insert into database
I need buil one system for insert into database
josimarsb
Posts: 12Questions: 0Answers: 0
I need buil one system for insert into database and I am using datatables.
It is master/detail system.
I want send data from my datatable for my server in php.
I don't speak english very well but I need yours help.
Thank you.
It is master/detail system.
I want send data from my datatable for my server in php.
I don't speak english very well but I need yours help.
Thank you.
This discussion has been closed.
Replies
I am not sure if the Editor is what you are needing. It is a CRUD framework for datatables.
http://editor.datatables.net/
Below is a link that might be what you are looking for.
http://editor.datatables.net/release/DataTables/extras/Editor/examples/deepObjects.html
Cheers...
do you have one exemple about this?
var oTable;
$(document).ready(function() {
$('#example').dataTable({
"oLanguage": {
"sLengthMenu": "Mostrar _MENU_ Itens por página",
"sZeroRecords": "Nenhum resultado econtrado",
"sInfo": "Itens _START_ até _END_ de _TOTAL_ registros",
"sInfoEmpty": "Tabela vazia",
"sInfoFiltered": "(encontrado(s) de _MAX_ registros)",
"sLoadingRecords": "Aguarde...",
"sSearch": "Procurar:",
"oPaginate": { "sFirst": "Início", "sPrevious": "Anterior", "sNext": "Próximo", "sLast": "Último" }
},
"bServerSide": true,
"sAjaxSource": "../ajax/ccusto.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "produto": "josimar", "value": "1"} );
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"sPaginationType": "full_numbers",
"sScrollY": 200,
"bLengthChange": false,
"bInfo": false,
"bFilter": false,
"asStripeClasses": [ 'linha_impar', 'linha_par' ],
"aoColumns": [
{ "sTitle": "Produto", "mDataProp": "produto"},
{ "sTitle": "Qtde", "mDataProp": "qtde" }
]
});
oTable = $('#example').dataTable();
});
function fnClickAddRow() {
/*oTable.fnAddData(
['',$('#qtde').val() ]
);*/
oTable.fnAddData(
[$('#descr_prod').val(),$('#qtde').val() ]
);
}
Allan