Just won't work!

Just won't work!

spitfire45spitfire45 Posts: 18Questions: 0Answers: 0
edited July 2010 in General
Must be having a bad day. I have been trying to incorporate DT into an application but instead of getting the desired output am receiving "no data available in table". In an (unsuccessful) attempt to find the problem I created a stripped down file to call a couple of columns which is available at http://www.example-store.com/test_customers.php

The odd thing is looking at it in Firebug - if copy the GET url that is showing an error and paste this into a browser it output the data in the correct format.

I must be missing something simple. Any help would be greatly appreciated.

Replies

  • arturartur Posts: 2Questions: 0Answers: 0
    http://www.datatables.net/examples/server_side/server_side.html

    First you need to also provide the bProcessing and bServerSide parameters. For the rest, try to copy the example from the link above.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Try this:

    [code]
    $('#customer_table').dataTable({
    'sAjaxSource': '/ajax/get_customer_data.php'
    });
    [/code]
    The code you had before was trying to get to http://example-store.com, but your server was saying to get it from http://www.example-store.com... (note the www). Using the above code as a relative URL rather than an abolsute one will bypass it altogether.

    Allan
  • spitfire45spitfire45 Posts: 18Questions: 0Answers: 0
    Yep - that was it - you are the man Allan!

    Thanks.
This discussion has been closed.