“Uncaught TypeError: undefined is not a function” error when calling table id
“Uncaught TypeError: undefined is not a function” error when calling table id
eweisbrot
Posts: 23Questions: 6Answers: 0
Hello,
I'm sure this has been answered before...but I cannot find a solution. It seems my data table isn't working due to an “Uncaught TypeError: undefined is not a function” on my table id (line number 3163 on this page: http://199.119.123.135/surety-bonds/licensed-states/california_surety_bond-mike.htm).
The table that's being called is within a PHP file, could this be causing the issue?
Thanks in advance!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Looks like jQuery is being loaded on the page multiple times. The one with DataTables attached to it is being overwritten by a later version.
You want to load jQuery just once.
Allan
Thanks for the info Allan. I fixed that issue, which seems to have lead to another one. Now there is an error that states "Uncaught ReferenceError: $ is not defined" (please see line 3159 on http://199.119.123.135/surety-bonds/licensed-states/california_surety_bond-mike.htm).
Any idea what's causing this?
Look at your console error info.
"ReferenceError: jQuery is not defined"
Thanks! Got it to work. Another question...when I click the "Next" button at the bottom of the table, it automatically scrolls down to the bottom of the page. Is this a known bug? Please see here:
http://199.119.123.135/surety-bonds/licensed-states/california_surety_bond-mike.htm
Not sure what you mean by "scrolls down to the bottom of the page". I'm not seeing anything but the expected behaviour - the page scrolling is not effected by the paging.
Allan
Seems to have fixed itself. Thanks Allan!