Table Not Loading Data
Table Not Loading Data
My development is internal so no link.
I have copied the server-side php/ajax example exactly. My JSON validates in Lint.
My data won't load. I get no data available in table displayed. I used the debugger which said my JSON was bad.
My debugger is uqukoy
Here is my JSON
[code]
{
"sEcho": 0,
"iTotalRecords": "8276",
"iTotalDisplayRecords": "8276",
"aaData": [
[
"",
"CMS",
"Custom Micro Systems",
"",
"",
"",
"",
"",
""
],
[
"",
"Administrator",
"System",
"",
"",
"",
"",
"",
""
],
[
"",
"Fred",
"Flintlock",
"Bedderberg",
"FL",
"",
"",
"",
""
],
[
"",
"",
"",
"",
"",
"",
"",
"",
""
],
[
"",
"",
"",
"Bushville",
"GA",
"",
"",
"",
""
],
[
"",
"Harold",
"Stone",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"Learned",
"Hand",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"Gang",
"Green",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"",
"",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"Alex",
"Attorney",
"",
"",
"",
"",
"",
""
]
]
}
[/code]
javascript:
[code]
$(document).ready(function() {
$('#recentintakes').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "tabledata/datatable_json.php"
} );
} );
[/code]
html
[code]
Intake DateFirst NameLast NameCityStateStatusCase TypeReferralAd Source
[/code]
I have copied the server-side php/ajax example exactly. My JSON validates in Lint.
My data won't load. I get no data available in table displayed. I used the debugger which said my JSON was bad.
My debugger is uqukoy
Here is my JSON
[code]
{
"sEcho": 0,
"iTotalRecords": "8276",
"iTotalDisplayRecords": "8276",
"aaData": [
[
"",
"CMS",
"Custom Micro Systems",
"",
"",
"",
"",
"",
""
],
[
"",
"Administrator",
"System",
"",
"",
"",
"",
"",
""
],
[
"",
"Fred",
"Flintlock",
"Bedderberg",
"FL",
"",
"",
"",
""
],
[
"",
"",
"",
"",
"",
"",
"",
"",
""
],
[
"",
"",
"",
"Bushville",
"GA",
"",
"",
"",
""
],
[
"",
"Harold",
"Stone",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"Learned",
"Hand",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"Gang",
"Green",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"",
"",
"Orlando",
"FL",
"",
"",
"",
""
],
[
"",
"Alex",
"Attorney",
"",
"",
"",
"",
"",
""
]
]
}
[/code]
javascript:
[code]
$(document).ready(function() {
$('#recentintakes').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "tabledata/datatable_json.php"
} );
} );
[/code]
html
[code]
Intake DateFirst NameLast NameCityStateStatusCase TypeReferralAd Source
[/code]
This discussion has been closed.
Replies
[code]
{
"sPaginationType": "bootstrap",
"oLanguage": {
"sSearch": "",
"sLengthMenu": "Limit: _MENU_"
},
"sDom": "T<\"clear\">lfrtip",
"oTableTools": {
"sSwfPath": "js/tableTools/swf/copy_csv_xls_pdf.swf"
}
}
[/code]
So server-side processing is not enabled.
Can you link to a test case please?
Allan
I'm not sure what that code does. It just looks like it's calling an swf, but those buttons don't appear to be flash. Does this mean dataTables does not work on iOS devices?
If that swf file has to load then that may be the problem because the script that has the dataTable embedded in it is in a lower directory.
var/www/site/area1/pagewithdatatable.php
The dataTable files are:
var/www/site/js/tableTools/swf/.........
In my embed file all the tags point correctly to the path of the .js files to load dataTables javascripts.
[code]
[/code]
Is there some document that explains how to call dataTables correctly when using in other areas of the site. I'm not sure why this path is not resolving correctly in the src, but it is probably looking for:
var/www/site/area1/js/tableTools/swf/......
which is wrong.
I don't put all my site files in the web root, certain pages will be in a directory like /controlpanel or /clientarea.
There's gotta be a way for this path to resolve correctly as I can't imagine dataTables expects all 'calling' files to be in upper directories, right? Thanks for your help.
Otherwise, specifically where do I enable/disable server-side processing?
The table tool files
/var/www/site/js/tableTools/
The dataTables src
/var/www/site/js/
I removed that script and the data loaded, but that script added other template elements so I am working with the author to get fixed.
Thanks. Obviously, this is still a huge problem with js frameworks.