I can't get the JQuery modal window option to work
I can't get the JQuery modal window option to work
I'm trying to get Editor's window to pop up as a modal window using jQuery's UI interface. I'm using the example on this page as reference: https://editor.datatables.net/reference/display/jqueryui
My code snippets are as follows:
$.extend( $.fn.dataTable.Editor.display.jqueryui.modalOptions, {
width: 'auto'
} );
editor = new $.fn..Editor( {
//ajax: "../php/staff.php",
table: '#historyTable',
...
...
…
These are the error messages that display in the browser debug window:
jQuery.Deferred exception: Unable to get property 'modalOptions' of undefined or null reference TypeError: Unable to get property 'modalOptions' of undefined or null reference
at Anonymous function (http://localhost:8080/XYZ/DispatchServlet?screenName=scrPension_Status&theSessionId=32265239A5972A2D6757011F32B562243576:3487:4)
at mightThrow (http://localhost:8080/DB7/js/jquery-3.4.1.js:3557:10)
at Anonymous function (http://localhost:8080/XYZ/js/jquery-3.4.1.js:3625:12) undefined
SCRIPT5007: Unable to get property 'modalOptions' of undefined or null reference
jquery-3.4.1.js (3850,3)
These are the links that I'm using for the jQuery UI. I'm successfully using JQueryUI's date picker on another screen so I think they are ok:
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
I'm doing something wrong. I just don't see it.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Sounds like you might not have loaded the editor.jqueryui.js file? Can you show me the full list of files you are loading?
Allan
That was it. I hadn't loaded in the jqueryui.js and .css files. Me dumb.
Thanks for your quick help on this.