dynamic table:Object doesn't support property or method 'DataTable'
dynamic table:Object doesn't support property or method 'DataTable'
![jillian_0810](https://secure.gravatar.com/avatar/061904e793bad2d1f9633712f3bdc8cb/?default=https%3A%2F%2Fvanillicon.com%2F061904e793bad2d1f9633712f3bdc8cb_200.png&rating=g&size=120)
Link to test case: http://live.datatables.net/wepebube/1/edit
Debugger code (debug.datatables.net):
Error messages shown: SCRIPT438: SCRIPT438: Object doesn't support property or method 'DataTable'
Description of problem:
Hi, everyone. I am a new user of DataTable. I have a question about using dynamic data structure to store records and implement Datatable() method. The link to test case might seem weird since it's not printing the data entries. It is because the entries are stored in a data structure dict_view. The columns are store in dict_view['columns'] and values are stored in dict_view['value']. Here is what the actual look in my local computer.
However, when I implement the datatable() method, an error popped up, saying the object does not support the method datatable(). Then I tested the datatable() method, but changed the input table into some hard-coded entries. The same error showed up. Hence, The data structure itself does not prevent the method from working.
I read the articles in the forum about the problem and I tried the solutions. The most mentioned potential problem might be the multiple loading of jQuery. Then I removed the downloaded libraries and loaded it again but it did not work. Hence I think there might exist some limitations that disallow the datatable() method to work. If anyone have idea of this, please share with me your solution. It would be very helpful
And one thing interesting is the datatable() method worked before in another branch with less features. Here is how it worked before. The two branches are using the same data structure so I think it should have worked.
This question has accepted answers - jump to:
Answers
Your test case doesn't exhibit the same issue so its hard to say. If you can't post a link to your page or a test case showing the issue then try the debugger and provide the code for the developers to look at.
Kevin
Hi, Kevin
Thank you for your reply! I have used the debugger and the debugger returned me this following errors:
SCRIPT5007: SCRIPT5007: Unable to get property 'length' of undefined or null reference
debug.js (1,8915)
SCRIPT438: SCRIPT438: Object doesn't support property or method 'ajax'
debug.js (1,14676)
SCRIPT5007: SCRIPT5007: Unable to get property 'FixedHeader' of undefined or null reference
debug.js (1,21861)
Thanks.
Did you click the link in my previous post?
http://debug.datatables.net/
Kevin
Hi, Kevin
Yes, I did clicked the link you provided and add the following code into my branch.
var n = document.createElement('script');
n.setAttribute('language', 'JavaScript');
n.setAttribute('src', 'https://debug.datatables.net/debug.js');
document.body.appendChild(n);
The problem is that the debugger showed up. But if you clicked on each feature, would return some errors as I posted in my comment.
By clicking the feature "check table info", returns "
SCRIPT5007: SCRIPT5007: Unable to get property 'length' of undefined or null reference
"By clicking feature "version check", returns
0: Object doesn't support property or method 'ajax'
By clicking feature "check for common issues" , returns
0: Unable to get property 'FixedHeader' of undefined or null reference
.I am not sure why this happened. Maybe datatable() is not supported?
Thanks again for your quick reply!![:) :)](https://datatables.net/forums/resources/emoji/smile.png)
Jillian
You don't incorporate the debugger link into your code.
You follow the link, starting from a page showing your table, and then upload the configuration for the developers to interpret.
Hi, Tangerine
Thank you for your reply. I am uploading the configuration for the developers to interpret. Thanks!
You'll also need to send us the code for us to find it. What would help the most is if you could update that example to demonstrate the issue, or link to a page that does. Without seeing, it'll be hard to debug.
Colin
Hi,
Thank you for all your help, Colin, Kevin, Tangerine.
I have found the issue that prevents the datatable() method from working! The problem is my teammate included jQuery in another file but I did not notice that. Then I removed the repeated one and find it working as before!
Thanks again for helping me out