DataTables transfering hosts, Undefined

DataTables transfering hosts, Undefined

sh4d0wssh4d0ws Posts: 2Questions: 0Answers: 0
edited April 2014 in General
Greetings,

I have recently switched from a localhost server to a dedicated webhost for my companies website. I'm currently working through a number of transfer errors (such as lacking proper version of PHP, missing JQuery, etc etc...). One thing that broke during the transition was the DataTables plugin I am using. Below is the code - Along with the error message. I get the feeling that the issue lies somewhere other then datatables, and I was wondering if anyone could point me in the right direction to solve this problem.

Please note, DataTables was working perfectly previously. I have no reason so suspect it is an issue with my setup for DataTables directly. It could be related to the jquery, or perhaps a missing website setting. Also note I did attempt to find a solution, some of the other similar issues I have already tried, along with removing and rewriting the code. I also renamed the files to exclude multiple .'s in the filename.

Thanks.

[code]



$(document).ready(function(){
$('#subTable').dataTable({
"bProcessing": true,
"bServerSide": true,
"bStateSave": true,
"iCookieDuration ": 7200,
"sAjaxSource": "/functions/json_tenders.php?percentage=<?=$percent;?>&lang=<?=$_SESSION['lang'];?>&searchName=<?=$searchName;?>&searchValue=<?=$searchValue;?>",
"sPaginationType": "full_numbers",
"sDom": '<"top"fl>rt<"bottom"pi><"clear">',
"bAutoWidth": true
});
});
[/code]

http://bidscaribbean.com/free_browsing.php

[code]Uncaught TypeError: undefined is not a function <-- On $('#subTable').dataTable[/code]

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,110 Site admin
    You are loading jQuery twice on that page. The first (which has DataTables attached to it) is being overwritten by the second.

    Allan
  • sh4d0wssh4d0ws Posts: 2Questions: 0Answers: 0
    Thanks for the answer. In my mad dash to try to fix some jQuery errors on other parts of the websites, I must have included it in a number of places (such as the header, footer, and on the page). The moment I removed the redundant calls it started working flawlessly. Thank you!
This discussion has been closed.