how to close the editor popup after successComplete of ajax POST and refresh table page
how to close the editor popup after successComplete of ajax POST and refresh table page
GE Power
Posts: 10Questions: 2Answers: 0
var editor = new $.fn.dataTable.Editor( {
ajax: {
url: "../updatedata",
type: "POST",
dataType: "json",
data: function ( d ) {
$.each(d.data, function (key, value) {
output.data.push(d.data[key]);
// console.log(d.data[key]);
});
return JSON.stringify(output.data[0]);
},
complete: function (xhr,text) {
// alert(xhr.status);
editor.hide();
table.ajax.reload();
},
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
},
table: "#Table1",
......
......
i am trying this its close the editor form popup but next time its not poping up on the selection of table row check box.
Please advise.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The key is what the
../updatedata
script is returning. Is it conforming to the data Editor expects? If not, what is it returning?Allan
Thanks Allen for help, it worked