“Uncaught TypeError: undefined is not a function” error when calling table id

“Uncaught TypeError: undefined is not a function” error when calling table id

eweisbroteweisbrot 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

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    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

  • eweisbroteweisbrot Posts: 23Questions: 6Answers: 0

    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?

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Look at your console error info.

    "ReferenceError: jQuery is not defined"

  • eweisbroteweisbrot Posts: 23Questions: 6Answers: 0

    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

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    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

  • eweisbroteweisbrot Posts: 23Questions: 6Answers: 0

    Seems to have fixed itself. Thanks Allan!

This discussion has been closed.