Installation problem with datatables server side processing and wordpress 3.0 - Page 2

Installation problem with datatables server side processing and wordpress 3.0

2»

Replies

  • allanallan Posts: 63,150Questions: 1Answers: 10,404 Site admin
    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?

    Allan
  • dingodingo Posts: 23Questions: 0Answers: 0
    edited July 2010
    Hi 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
  • allanallan Posts: 63,150Questions: 1Answers: 10,404 Site admin
    Excellent! Nearly there now :-)

    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
  • dingodingo Posts: 23Questions: 0Answers: 0
    1. Styling, the CSS is now included, but not sure if this is okay this way.

    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]
  • dingodingo Posts: 23Questions: 0Answers: 0
    Ahh, I am sorry, sorting works! The mouse dont becomes to a "hand" because of the link, but when I click into the title it works...

    So I think only styling is my last problem! :)
  • allanallan Posts: 63,150Questions: 1Answers: 10,404 Site admin
    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"?

    Allan
  • dingodingo Posts: 23Questions: 0Answers: 0
    THIS is the result of your very NICE SUPPORT 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
  • allanallan Posts: 63,150Questions: 1Answers: 10,404 Site admin
    Sorted! Great to hear you got it working in the end :-)

    Allan
This discussion has been closed.