The very first example not working

The very first example not working

yshtilyshtil Posts: 17Questions: 6Answers: 0

Link to test case:
My code is in the initial stage and I use a local script based Catalyst server. The HTML code is relatively short:
Look at the uploaded code.
Debugger code (debug.datatables.net):
Not yet
Error messages shown:
No error messages,
Description of problem:

The table is not decorated at all. I wasn't able to set a breakpoint on the ready function, so I assume it does not run.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    Answer ✓

    You are trying to load these resources:

        <link href="file:///test/jquery.dataTables.min.css" rel="stylesheet"></link>
        <script src="file:///test/jquery.dataTables.min.js" type="text/javascript"></script>
        <script src="file:////jquery-3.6.0.js" type="text/javascript"></script>
    

    Look at the browser's console for errors. I suspect you will see errors trying to load the files. Web browsers don't allow direct access to the file system as it would be a big security issue. You will need a web server to load the files from.

    Second issue is that load order is important. datatables.js requires jquery.js so jquery.js needs to be loaded first. Pay close attention to the load order when looking at the examples. Best practice is to use the Download builder to get the files you need and in the proper order.

    Kevin

  • yshtilyshtil Posts: 17Questions: 6Answers: 0

    Thank you very much.

Sign In or Register to comment.