How to add extra information in Ajax?
How to add extra information in Ajax?
support@kosmos.de
Posts: 16Questions: 7Answers: 0
in Editor
Im traing to add the Parent id to the payload.
This ist not working. as I thought it would. The Payload only has de Row data
ajax: {
create:{
type:'POST',
url: '/api/v1/budgets/marken/new',
},
edit:{
type:'PUT',
url: '/api/v1/budgets/marken/edit',
},
remove:{
type:'DELETE',
url: '/api/v1/budgets/marken/delete'
},
data: function ( d ) {
var selected = tabelleGeschaeftsfeld.row( { selected: true } );
if ( selected.any() ) {
d.pid = selected.data().id;
}
}
},
This question has an accepted answers - jump to answer
Answers
Since you are defining separate HTTP methods for each operation I suspect you will need to move the
ajax.data
option inside each HTTP method along withurl
andtype
.Kevin