Install Instructions?
Install Instructions?
Ok I am newbie to DataTables.
Download the 1.4.3 package and open up the readme. Install instructions point to a URL that returns a 404 error -- http://sprymedia.co.uk/article/DataTables+1.4+(beta)
The reason I ask is that DataTables is working on the table I have built but the graphics are not displaying. I need to know what the proper directory structure that DataTables expects.
Thanks.
Download the 1.4.3 package and open up the readme. Install instructions point to a URL that returns a 404 error -- http://sprymedia.co.uk/article/DataTables+1.4+(beta)
The reason I ask is that DataTables is working on the table I have built but the graphics are not displaying. I need to know what the proper directory structure that DataTables expects.
Thanks.
This discussion has been closed.
Replies
Oops - sorry about the 404 - that has been fixed in the 1.5 series (1.4 is unlikely to see another upgrade unless this is something very major!).
The directory structure doesn't matter to DataTables itself - as long as you include jQuery and DataTables itself. If you want styling you need to include the CSS file from the right place (and any images in that need again to point to the right place).
Could you perhaps link to an example where the images aren't working for you? Did they work if you don't use DataTables (i.e. a plain HTML table)?
Here is a link to the zero configuration example: http://datatables.net/examples/example_zero_config.html
Allan
Thanks for the follow thru. Actually If I load a static table for display everything works fine. (I had to move the jpg's to the right place).
What I am attempting to do is insert a table into a container using a jQuery ajax call. Something like --
ajax('{{=URL(r=request,f='list')}}',[''],'contactlist'); //a web2py idiom for a jQuery .ajax call
$(document).ready(function() {
$('#contactlist').dataTable();
} );
The table is displayed and dataTables formats the table visually. However events like sort, search are not responding. I am assuming that the DOM is not set when dataTables is invoked causing the behavior.
If the DataTable is the only item on the page which the loaded Ajax data effects, then perhaps the easiest way to load the data would be to use DataTables' sAjaxSource option: http://datatables.net/examples/example_ajax_source.html
Alternatively, if you want access to the JSON return from the server, the you might be better passing DataTables an array of data to use: http://datatables.net/examples/example_dynamic_creation.html
Perhaps you could have a look at these two examples and see what you think? Let us know if you run into any problems or have any more questions.
Allan
Finally have it dataTables working. Used the aaData technique you suggested. Python is generating the JSON dataset.
Minor suggestion, you might make reference to the fact that the demo.css has directory references to the jpg's. It stumped me for a while why the ascending/descending graphics were not displaying till a coworker made a remark.
I have to say, this makes life a heck of a lot better in creating tables. Thanks one heck of a lot for developing this!
JohnMc
Regarding your suggestion. What I've done is to had a description header to my CSS file, and include the following "FAQs":
[code]
* Common issues:
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
* no conflict between the two pagination types. If you want to use full_numbers pagination
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
* modify that selector.
* Note that the path used for Images is relative. All images are by default located in
* ../images/ - relative to this CSS file.
[/code]
Allan