I have a problem with loading the datatable on some PC

I have a problem with loading the datatable on some PC

SaprileSaprile Posts: 4Questions: 0Answers: 0

Hello everyone, I have a problem with loading the datatable on some PC. The datatable contains 3330 elements, everything is loaded regularly from my PC, but on some PC, with various browsers, the loading takes place partially, the filters do not load, pagination do not load, the export buttons do not load . Why does this problem happen on some PC?
I hope someone gives me solutions.
Thank you

Replies

  • kthorngrenkthorngren Posts: 21,179Questions: 26Answers: 4,923

    What debugging steps have you taken on those PC's?

    Have you looked for errors in the browser's console? Have you tried incognito mode in the browser?

    Kevin

  • SaprileSaprile Posts: 4Questions: 0Answers: 0

    This is the errors on the PC

    Uncaught TypeError: $ is not a function
    at HTMLDocument.<anonymous> (gestione-tessere-new-temp:2913)
    at mightThrow (jquery-3.3.1.js:3534)
    at process (jquery-3.3.1.js:3602)

    but, why only in this pc?

  • SaprileSaprile Posts: 4Questions: 0Answers: 0

    what should i do to solve the problem?

  • kthorngrenkthorngren Posts: 21,179Questions: 26Answers: 4,923
    edited March 2021

    Thats not a Datatables error. The error has something to do with jQuery. Stack Overflow will be. more help with this error, like this thread.

    Without access to the PC with the error it will be difficult to debug. Maybe some of the dependencies aren't being loaded or maybe not in the right order or maybe they are loaded more than once. We can take a look if you post a link to your page or a running test case showing the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Maybe there is a cache or some other issue with the browser on that PC. Did you try the browser in incognito mode? Have you tried other browsers?

    Take a look at this line gestione-tessere-new-temp:2913 in you script to see what is using $. What is happening in that code?

    Kevin

  • SaprileSaprile Posts: 4Questions: 0Answers: 0

    I solved it by replacing $ with jQuery, this way the error doesn't show up and the table loads correctly.

    The suggestion in the console was useful.
    Thank you kthorngren!

This discussion has been closed.