Searc works with static data but not with dynamic data.

Searc works with static data but not with dynamic data.

AverageGuyAverageGuy Posts: 5Questions: 0Answers: 0
edited October 2010 in General
I have a very simple php scrip that does nothing except extract info from a db and create a json string. When I redirect the output of the php script to a file and use that file as my table data, e. g.

[code]
oTable = $('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": 'Data.txt'
} );
[/code]

However if I load the data from the same php script, as in this:

[code]
oTable = $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'getData.php'
} );
[/code]

Search doesn't even find the first letter. It does do an ajax call to getData.php for every keystroke and data is being transfered. Thanks, to Firebug for the ability to see that.

I just noticed another problem. Using the php script, the top says showing 10 entries, however all the entries are displayed and at the bottom is displayed the following:

Showing 1 to NaN of und,efi,ned entries

Jim.

Replies

  • AverageGuyAverageGuy Posts: 5Questions: 0Answers: 0
    I just realized that with dynamic data, the searching algorithm must be implemented on the server side. Sorry for the wasted bandwidth.
This discussion has been closed.