I need pass to data row in DRUD
I need pass to data row in DRUD
rrzavaleta
Posts: 78Questions: 52Answers: 2
pass the data content of the row to url defined in Drud .
Following the example https://editor.datatables.net/examples/advanced/REST.html
But no need to use PK pass the contents of all variables in the table but not how to pass the contents of the table to the url . for example:
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
ajax: {
remove: {
type: 'DELETE',
url: '../php/rest/remove.php?campo1=ID_ASEGURADORA&campo2=ID_CAMPO'...
}
},
....
columns: [
{ data: "ID_ASEGURADORA", visible:false},
{ data: "ID_CAMPO", visible:false},
{ data: "VAL_CAMPO"}, //la ptabla origen html debe estar definida asi como su tablas,
{ data: "SECUENCIA", visible:false}, //Las lineas title reescriben el nombre de las columnas a mostrarse
{ data: "DESC_VALOR",},
],
as I pass all variables a row to ulr url: ' ../php/rest/remove.php
This discussion has been closed.
Answers
I'm afraid I don't understand. The table contents should already not be passed to the url. Only the primary key value should be sent since that is all the server needs to be able to delete the rows.
Allan
my question is .
Can I pass other values ββin the table by the url or just the id ?
I see - thanks for the clarification. On delete only the ID is sent. You would need to use
preSubmit
to send additional information if you require it.Allan