How do you stop the submit event?
How do you stop the submit event?
I'm using the inline edit functionality, but I do not want to utilize the editor's submit() event. What I'm hoping for it something like this:
editor1 = new $.fn.dataTable.Editor(
{
ajax: myUrl,
table: "#editTable1",
idSrc: "id",
fields: fieldList
});
editor1.on('preBlur', function(e) {
e.preventDefault;
dLog('preBlur');
var modifier = editor1.modifier();
if (modifier) {
var data = editTable.row(modifier).data();
dLog(data);
dLog(editor1.get());
}
});
editor1.on( 'processing', function (e, processing) {
e.preventDefault;
editor1.off('edit');
dLog('processing');
} );
$('#editTable1').on('click', 'tbody td:not(:first-child)', function(e) {
editor1.inline(this);
});
This allows me to catch the changes that the user has made and then shoot them off to fun my own queries and whatnot. However, the inline function automatically calls submit() every time and it shoots me a bunch of errors and causes my page to crash.
Is there a way to intercept or disable the submit call?
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
You need to use
ajax
as a function to implement your own data update. You need to make sure that thesuccess
callback is given the JSON data it expects.Allan