Yes good news :-). So the trick now is to figure out what is going on with the other script. I assume you have the same $sTable and $gaSql in the server_processing.php script that you have in the test script? Also where did you get the server_processing.php script from and which version of DataTables are you using?
I'm wondering if it is best to replace the server_processing.php script you currently have with the one here: http://datatables.net/development/server-side/php_mysql (filling in the variables as needed of course). If you do that, what do you get?
1. Styling: Have you included the demo CSS file in your HTML? I don't see it in a quick scan of your HTML from before. It's called demo_table.css (media/css/).
2. Sorting etc: What does the Firebug console show when you click on one of the column headers? There should be an XHR sent to the server to get the data (which will have been sorted at the server side).
The cursor doesn't become a 'hand' since that is a styling thing, and it sounds like the files are being imported correctly at the moment. You've got an absolute path of "/dataTables-1.6/media/css/demo_table.css" (you shouldn't need the demo_page.css file).
Should that path in fact be "/konrad2/dataTables-1.6/media/css/demo_table.css"?
Replies
I'm wondering if it is best to replace the server_processing.php script you currently have with the one here: http://datatables.net/development/server-side/php_mysql (filling in the variables as needed of course). If you do that, what do you get?
Allan
Replaced the old script with the new one from your link. The data is now loaded into the table! :)
But why the table is not styled as yours? Also sorting etc. does not work.
http://img841.imageshack.us/img841/7240/bildschirmfoto20100719us.png
1. Styling: Have you included the demo CSS file in your HTML? I don't see it in a quick scan of your HTML from before. It's called demo_table.css (media/css/).
2. Sorting etc: What does the Firebug console show when you click on one of the column headers? There should be an XHR sent to the server to get the data (which will have been sorted at the server side).
Allan
2. There are no links to click on in the column headers.
This is a part of my sourcecode of the page: (Cannot post the full code, forum does not accept this lenght of a post) ;)
[code]
@import "/dataTables-1.6/media/css/demo_page.css";
@import "/dataTables-1.6/media/css/demo_table.css";
Id
Open
High
Low
Close
Cci
Macd
Date
Time
Loading data from server
Id
Open
High
Low
Close
Cci
Macd
Date
Time
Comments on this entry are closed.
Get smart with the Thesis WordPress Theme from DIYthemes.
WordPress Admin
<!--[if lte IE 8]>
<![endif]-->
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/konrad2/dataTables-1.6/examples/examples_support/server_processing.php"
} );
} );
[/code]
So I think only styling is my last problem! :)
Should that path in fact be "/konrad2/dataTables-1.6/media/css/demo_table.css"?
Allan
THANK you, many many thanks! :)
http://img830.imageshack.us/img830/7900/bildschirmfoto20100719ui.png
I think this thread a superb step by step guide for beginners... :D
Allan