Error in dataTables.editor.min.js file
Error in dataTables.editor.min.js file
alpachadha
Posts: 9Questions: 3Answers: 0
I am trying to run this below code. It is giving me following error in dataTables.editor.min.js file
Error: dataTables.editor.min.js:84 Uncaught TypeError: this[(((((W6 + S9J) + Y1J) + Y8a) + Q5h.s2a) + l9a)] is not a function
<script type="text/javascript" src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.11/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.1.2/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.1.2/js/buttons.bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/select/1.1.2/js/dataTables.select.min.js"></script>
<script type="text/javascript" src="/$cinfo.getSiteName()/scripts/js/dataTables.editor.min.js"></script>
<script type="text/javascript" src="/$cinfo.getSiteName()/scripts/js/editor.bootstrap.min.js"></script>
<script language="javascript" type="text/javascript">
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
editor = $('#reports').dataTable.Editor( {
ajax: "/merlin/$cinfo.getSiteName()/FreseniusReportManager",
table: "#reports",
fields: [ {
label: "Nomination Id:",
name: "Nomination_Id"
}, {
label: "Nomination Date:",
name: "Nomination_Date"
}, {
label: "Nominator:",
name: "Nominator"
}, {
label: "Nominee :",
name: "Nominee"
}
]
} );
var table = $('#reports').DataTable( {
lengthChange: false,
ajax: "/merlin/$cinfo.getSiteName()/FreseniusReportManager",
columns: [
{
data: null,
defaultContent: '',
className: 'select-checkbox',
orderable: false
},
{ data: "Nomination_Id", className: 'editable' },
{ data: "Nomination_Date", className: 'editable' },
{ data: "Nominator" , className: 'editable' },
{ data: "Nominee" , className: 'editable' },
{ data: "Nominee_email" },
{ data: "Nomination_Reason"},
{ data: "Nomination_Message" }
],
select: true
} );
// Display the buttons
$('#reports').dataTable.Buttons( table, [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
] );
table.buttons().container()
.appendTo( $('.col-sm-6:eq(0)', table.table().container() ) );
} );
</script>
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Replies
This is not how you create an Editor instance.
The documentation shows how an Editor instance can be created and the examples all use that approach.
If that doesn't work, please could you give me a link to the page so I can try to help debug it.
Regards,
Allan
editor = new jQuery.fn.dataTable.Editor({ Sorry did cut copy paste , this is working now