Uncaught ReferenceError: define is not defined

Uncaught ReferenceError: define is not defined

T RaiT Rai Posts: 1Questions: 1Answers: 0

Hello,
I am trying to to use the DataTable Editor, the one with the basic initialization. But I have so many errors being reported as shown below. I am using the js libraries and css libraries specified in the examples and they are -

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.4/css/buttons.dataTables.min.css"/>
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.2.7/css/select.dataTables.min.css"/>
<link rel="stylesheet" href="https://editor.datatables.net/extensions/Editor/css/editor.dataTables.min.css"/>

<script src="https://code.jquery.com/jquery-3.3.1.js"></script> 
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script> 
<script src="https://cdn.datatables.net/buttons/1.5.4/js/dataTables.buttons.min.js"></script> 
<script src="https://cdn.datatables.net/select/1.2.7/js/dataTables.select.min.js"></script> 
<script src="https://editor.datatables.net/extensions/Editor/js/dataTables.editor.min.js"></script>  

**Now the errors are - **

dataTables.editor.min.js:1 Uncaught ReferenceError: define is not defined
at dataTables.editor.min.js:1
at dataTables.editor.min.js:1
(anonymous) @ dataTables.editor.min.js:1
(anonymous) @ dataTables.editor.min.js:1

jquery-3.3.1.js:3818 jQuery.Deferred exception: $.fn.dataTable.Editor is not a constructor TypeError: $.fn.dataTable.Editor is not a constructor
at HTMLDocument.<anonymous> (http://127.0.0.1:5500/editDataTable.html:31:15)
at mightThrow (https://code.jquery.com/jquery-3.3.1.js:3534:29)
at process (https://code.jquery.com/jquery-3.3.1.js:3602:12) undefined
jQuery.Deferred.exceptionHook @ jquery-3.3.1.js:3818
process @ jquery-3.3.1.js:3606
setTimeout (async)
(anonymous) @ jquery-3.3.1.js:3640
fire @ jquery-3.3.1.js:3268
fireWith @ jquery-3.3.1.js:3398
fire @ jquery-3.3.1.js:3406
fire @ jquery-3.3.1.js:3268
fireWith @ jquery-3.3.1.js:3398
ready @ jquery-3.3.1.js:3878
completed @ jquery-3.3.1.js:3888

jquery-3.3.1.js:3827 Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
at HTMLDocument.<anonymous> (editDataTable.html:31)
at mightThrow (jquery-3.3.1.js:3534)
at process (jquery-3.3.1.js:3602)

I have not clue what's happening here :( Can anybody help me understand what I could be doing wrong? All the css and js libraries are straight from the example.

I have also attached the source file to show what I am doing.

Any help would be highly appreciated!

Thank you.
TR

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    My understanding is that for the Editor to work you need to download it. Since its a licensed (pay for application) it is not setup to be included from the Datatables site. You can download a 15 day free trial.

    Hope that resolves your Editor errors listed above.

    Kevin

This discussion has been closed.