using buttons in datatable to send row data to server
using buttons in datatable to send row data to server

I want to have a custom buttom which sends a selected table row data to my server .
Which method / function should i use inside Javascript to send the data to my server?
buttons:[
{
text: 'Send',
action: function () {
var oid = $.map(table.rows({selected:true}).data(), function (item) {
return item[3]
});
var appby = $.map(table.rows({selected:true}).data(), function (item) {
return item[2]
});
var odt = $.map(table.rows({selected:true}).data(), function (item) {
return item[1]
});
var cname = $.map(table.rows({selected:true}).data(), function (item) {
return item[4]
});
var cno = $.map(table.rows({selected:true}).data(), function (item) {
return item[5]
});
alert(cno+" "+cname);
}
}
],
I dont know what to do after this.
This discussion has been closed.
Replies
You would issue an
ajax()
with the data you want to send - see here for info on that,Colin
I solved it using FormData and XHR. Thank you