how to display ajax response and close bubble editor form
how to display ajax response and close bubble editor form
jacob.siu
Posts: 3Questions: 1Answers: 0
editor = new $.fn.dataTable.Editor( {
table: "#dataTable",
idSrc: 'dt_rowid',
ajax: {
url:'xxxx.php'
,data:{ "form": "bom" }
,success: function(response){
alert(response);
}
}
});
This discussion has been closed.
Answers
Hi,
I'm not clear on what you want to do here I'm afraid. If you just want to display the JSON returned from the server - use the
postSubmit
event:Allan
I try to create (add) a row.
In case successful, editor will reload the table and reflect the change. That is good.
However, I want to display message like 'cannot add for data existed already' in case add is failure. I just don't know how.
That is my question, thx in advance.
Hi Allan,
Thanks for your help ... after trying with postSumit event, I believe all I need is adding my 'message' in error object on server side response. The 'message' will display on the form footer as an error ( in red )
To me case is closed.
Thx