Error in datatable inline editing
Error in datatable inline editing
osamajaved
Posts: 12Questions: 6Answers: 0
Hi I am facing 2 issue while implementing datatables inline-editing
1. Uncaught ReferenceError: define is not defined
The error is in dataTables.editor.min.js
- $.fn.dataTable.Editor is not a constructor
The error is where we initialize editor
editor = new $.fn.dataTable.Editor({
"ajax":
{
"url": url,
"type": "POST",
"dataType": "JSON",
"data": { model: data }
},
table: "#MassUpdateReport",
fields: [{
label: "First name:",
name: "first_name"
}, {
label: "Last name:",
name: "last_name"
}, {
label: "Position:",
name: "position"
}, {
label: "Office:",
name: "office"
}, {
label: "Extension:",
name: "extn"
}, {
label: "Start date:",
name: "start_date",
type: "datetime"
}, {
label: "Salary:",
name: "salary"
}
]
});
I am using following version of jquery:
jQuery JavaScript Library v2.2.0
Regards
Usama
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you also getting this message?
If so see if this thread helps:
https://datatables.net/forums/discussion/comment/126656/#Comment_126656
Kevin
No, There are 2 errors i am getting
1. "Uncaught ReferenceError: define is not defined" in dataTables.editor.min.js
2. "$.fn.dataTable.Editor is not a constructor" in my js file, the code is mentioned above
If it isn't that, then you might be loading jQuery multiple times.
And if it isn't that, can you link to the page showing the issue so we can take a look and help to debug it please.
Allan
yes I also experienced such an error, how to solve it?
thank you..
If the suggestions above don't help then, as Allan asked, please provide a link to your page for debugging.
Kevin
Hi @allan
Here is the link
https://dev.timeguru.biz/Report/RegistrationReport?reporttype=4
I might be missing it but I don't see where you are loading the Editor JS code, for example:
dataTables.editor.min.js
Have you downloaded and installed the Editor?
https://editor.datatables.net/manual/installing/
Kevin
Yes, that was missing somehow. and its updated now.
I am using javascript file downloaded from https://editor.datatables.net/extensions/Editor/js/dataTables.editor.min.js
Can you please check again.
https://dev.timeguru.biz/Report/RegistrationReport?reporttype=4
thanks
I don't see a trial license for your account. Did you download the trial?
Allan