Can't make a given example to work [solved]
Can't make a given example to work [solved]
I'm trying to generate the tables as per this example: http://www.datatables.net/release-datatables/examples/data_sources/server_side.html
Problem is... Nothing works ! The table seems not to generate itself, and I'm having no (visible?) error, so I can't really find what the problem is. I though it might be a json problem, but taking the server side code given in the example and trying to load it directly throws me a bunch of error (it seems to wait for some GET variables that datatables() sends?)
So well... I guess my first question would be: how could I debug this example, if I don't see any error, except the table not being generated?
Problem is... Nothing works ! The table seems not to generate itself, and I'm having no (visible?) error, so I can't really find what the problem is. I though it might be a json problem, but taking the server side code given in the example and trying to load it directly throws me a bunch of error (it seems to wait for some GET variables that datatables() sends?)
So well... I guess my first question would be: how could I debug this example, if I don't see any error, except the table not being generated?
This discussion has been closed.
Replies
Use Firebug and compare the XHR in my working demo to the one in your setup.
Allan
It would seem that I'm not even going to the XHR request at all!
k is undefined
http://idefix/generateurs/zOutils/plugins/jquery-datatables/jquery.dataTables.min.js
Line 151
Allan
Ok, I've unminifed the code, and... There is the error !
__
oColumn is undefined
http://idefix/generateurs/zOutils/plugins/jquery-datatables/jquery.dataTables.min.js
Line 7247
__
I was thinking it might be cominf from the PHP at the end of it all, but it still doesn't try and load any XHR request from it, so I'm really clueless! (And truth be told, it's the first time I can't make datatables to work! Otherwise (when it's built manually) it's just working out of the box, like magic!)
Allan
It was exactly what was missing. But weirdly, not because I haven't tried. Yesterday, I had my table, all set, and datatable.js was sending me a javascript alert about it not being able to populate the table, or something like that.
I just wrote back the table as it should and... It's working!
I'm puzzeled, but well.. THANKS !! Now that this is resolved, your work on datatables will avoid me many headaches!
Allan
Thanks again!
I'm curently using a basic template for a webapp, and... It had a custom function to generate basic tables via a class selector called "datatable". And guess what class I gave to my own tables generated?
That's right.
Now, I'm out hiding in shame! :P