post... and submit... editor events never reached
post... and submit... editor events never reached
Licass
Posts: 6Questions: 2Answers: 0
I need help on why these events ex:postSubmit and submitComplete never fired besides correct data is returned by server.
duplicated requests is the problem. Here a link http://www.quad-systems.pt/QUAD_HCM/#ajax/datatablePROTO.php
maybe because of
ajax: function (data, callback, settings) {
var dat = JSON.parse(myTableName.getData(myTableName.initState));
callback(dat)
},
Realy need help. Thanks
This discussion has been closed.
Answers
Hi,
Thanks for getting in touch. I don't appear to have a trial or purchased license for your account on file. Could you let me know what account your Editor license was purchased with please?
Thanks,
Allan
I am the developer of user Pmengo Invoice #: 3094
I as logged in as Pmengo but as you didnt answer my questions(maybe newbie questions) i start to post as another user account i had.
I really need your help. cant fire the editor events after click save or create.
Data is returned and seems ok.
http://www.quad-systems.pt/QUAD_HCM/#ajax/datatablePROTO.php
Please test an Update click pencil button
Thanks for the clarification. Sorry I missed a couple of your questions from your other account! That was simply due to the volume of questions on this forum and I just missed your questions.
The issue in this case is that you are using
ajax
with an override function:That in itself is no problem, you can do that, as the documentation notes. The issue is that you aren't calling the
callback
function when the Ajax request is complete.You need to call that function so that Editor knows that the data has been updated, and therefore it can trigger the events that you are looking for.
Please note that it must be given data in the format described in the manual.
Regards,
Allan
VM205256:10 Uncaught TypeError: callback is not a function$.fn.dataTable.Editor.ajax @ VM205256:10Editor._ajax @ VM205076:4076Editor._submit @ VM205076:5072send @ VM205076:3399Editor.submit @ VM205076:3421btn.fn @ VM205076:2001(anonymous function) @ VM205076:2030n.event.dispatch @ jquery.min.js:3r.handle @ jquery.min.js:3
VM205079:179 scrol up: 0 innerheight : 1240 1240
Your
editorEvents.js
file currently contains:It doesn't look like the
callback
parameter is being used at all. You might need to pass it into yourgetData
function if you need to use that function, and can it execute the callback when done.Allan
i am using it in dev machine
Can you put it live so I can attempt to debug the issue please.
Allan
ok.done . Thanks you very much
Thanks - however, I still don't see the
callback
function being called in theajax
function you have defined:I've clear my browser's cache, so I don't think its a cache issue.
One other thing I spotted - inside your
preSubmit
event handler you have:Calling
submit()
inside thepreSubmit
event handler isn't valid since it is already submitting. Justreturn;
will do to allow the submit to complete.Allan