submit not calling ajax url
submit not calling ajax url

Using datatables serverside, populated via c# mvc.
upgraded to newest versions of all libraries. Now submit is not calling my ajax url. The initsubmit even is called, but it does not go past that.
it was working prior to updating to lastest.
I apologize for not being able to provide a link to a working example.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
does not submit inline or bubble. Does not throw any error.
here is link to debugger upload
https://debug.datatables.net/axodin
editor version 1.9.5
datatables version 1.10.22
this is the list of js files I am including
"~/Scripts/dist/jszip.js",
"~/Scripts/moment.js",
"~/Scripts/DataTables/jquery.datatables.js",
"~/Scripts/DataTables/dataTables.buttons.js",
"~/Scripts/DataTables/buttons.flash.js",
"~/Scripts/DataTables/buttons.html5.js",
"~/Scripts/DataTables/buttons.print.js",
"~/Scripts/DataTables/dataTables.bootstrap4.js",
"~/Scripts/DataTables/dataTables.fixedHeader.js",
"~/Scripts/DataTables/dataTables.select.min.js",
"~/Scripts/DataTables/select.bootstrap4.min.js",
"~/Scripts/DataTables/select.dataTables.js",
"~/Scripts/DataTables/datetime-moment.js",
"~/Scripts/jquery.validate.js",
"~/Scripts/Editor/dataTables.editor.min.js",
"~/Scripts/Editor/editor.bootstrap4.min.js"
Are any console errors generated?
Kevin
no errors
just does not submit, it was working up until i updated my javascript files to newest version
tried every possible option from the documentation. This should not be this hard...
Am I missing something in my configuration?
I don't believe you are missing anything from looking over what you have above, but obviously something somewhere is going wrong.
Couple of initial questions:
initSubmit
?editor
the variable as a global. Do you have others with the same name on the page?Are you able to give me a link to the page please? You can send it to me privately by clicking my forum user name above and then "Send message".
I'm not aware of a fundamental error in Editor 1.9.5 - as you can see on this page it will submit to the URL given.
Thanks,
Allan
I am not sure what version it was previously. I was having an issue with the inline blur submit. It was not working correctly when clicking into another row, it would try to the editor for that new cell prior to the other one finishing being saved.
I used the debug tool and it showed that I was using old versions of all the libraries. So I updated them by dowloading the newest files.
After the update, the inline blur submit is not working at all.
I put the initSubmit there to see if any events are getting called. There is not change if it is there or not. It's supposed to call the ajax right after the initSubmit event, but it does not.
There is only one editor.
I am not able to send you a link, at this point of development the new app only resides on my development machine.
Does this have something to do with it being an MVC project using bootstrap for styles?
It was working (with the issue described above) until I updated the files.
Am I missing a reference? Do I have a conflicting js file? using Jquery 3.5.1 and jquery ui 1.12.1.
Could it have something to do with moment.js? Does that need to be a specific version? I have 2.27.0
I think there is some sort of problem with editor and mvc.
I just separated the editable grid onto its own view. I am loading only the js and css files shown in the working example directly from the cdn source (except the editor).
Still getting the same issue. It looks to me like the issue is with dataTables.editor.min.js
I debugged the datatables.editor.js code and I see where the issue is. One of my fields (Comments) is always coming back as processing. So it exists out of the submit.
correction. multiple fields have the processing css set to block
this is the culprit here
Editor.prototype._noProcessing = function (args)
{
let processing = false;
};
I tried removing all of the fields except one, and that fixes this.
But I am back to the issue I was having before, if I click outside of the grid, then the submit happens and the grid reloads.
If i click on another row, it throws error here on detach due to not being able to load the node.
I have seen some other posts with this issue, but have not found a solution.
So after the upgrade I have two problems, the node issue and multiple fields processing when they are not...
This seems like I have an issue with my setup.... What am I doing wrong? Am I calling the editor incorrectly? Are my field definitions wrong?
I was using some custom editor fields, I have removed those and still see this issue.
Is it just an issue with server side processing and inline edit?
This is very frustrating. What am I doing wrong?
I made my code as simple as possible, just one field and still have the issue with node being null when clicking into another row.
....
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href='@System.Web.Configuration.WebConfigurationManager.AppSettings["BaseUrl"]' />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Paperless Proforma</title>
</head>
<body>
</html>
....
Is there an issue with the way I am calling inline editor?
....
$('#fees').on('click', 'tbody td', function (e) {
editor.inline($(this), {
onBlur: 'submit',
});
});
....
Or is it a bug when you blur by clicking another editable cell?
I don't see this issue in your example.
Tried IE and Chrome browsers with same result.
Is it due to MVC environment?
I got my simplified example working with the following code, so it is the way I am callng the editor.
...
$('#fees').on('click', 'tbody td', function (e) {
editor.inline($(this)[0]._DT_CellIndex, {
onBlur: 'submit'
});
})
...;
Adding a second column brings me back to the initial issue where the processing is always true....
However, this issue is now only in IE11, chrome is working correctly. (Great Success!)
Could this be a bug with IE11?
You are using server-side processing, so you need to use:
Note the use of
cell().index()
. That is because when server-side processing is used, the elements are recreated - thus the old element thatthis
points to doesn't exist any more. That code is used in this example.Regarding the processing issue - are you using
dependent()
anywhere, or manually setting the processing flags?Allan
No, not doing either of those.
Yes, I am aware of the index needing to be passed on. However, I don't want the whole td to be clickable, just specific elements, therefore I am doing the below. I could not get something like table.cell( this.parent() ).index() to work
Could this be causing issue for Internet Explorer?
Unrelated question: How do you call multiedit for only a specific field?
This opens the editor up for all of the columns.
Try:
You don't. You'd need to hide the fields that you don't want in the form.
Allan
table.cell($(this).closest('td')).index() is working but only in chrome. Still the same issue with IE.
Just IE or Edge as well? Which version of IE - given that Microsoft are trying to kill IE themselves, I'm very much inclined to more away from it.
That said, what happens in IE - any errors? What debugging have you done? Do it call the edit method or not?
Allan
IE 11.1518.17763.0
update 11.0.210
there are no errors.
We are trying to get away from IE as well, but my firm still has it as the default browser.
When debugging, it gets to this code, but never gets to -->> this._submit.apply(this, args);
$.each(this.s.fields, function(name, field) {
if (field.processing()) {
processing = true;
}
});
if (processing) {
this.one('processing-field', function () {
// Are any other fields in a processing state? - Might need to wait again
if (this._noProcessing(args) === true) { -->>> This is always False
this._submit.apply(this, args); -->> Never gets to here
}
});
}
return ! processing;
it opens the edit, but it does not submit onblur
thanks for all your help by the way.
i'm doing server-side and processing. I think that definitely has something to do with this.
We have the same error with IE
I tested the published demo for inline editor inside IE is not working:
https://editor.datatables.net/examples/inline-editing/simple.html
Someone find solution?