views:

105

answers:

0

(This question is very specific to the dataTables plugin)

Hi, I'm using the dataTables plugin (1.70) for jQuery (1.4.2) in my web application, and I'm trying to write a custom .csv export for my tables.

I've already got a fully functioning (search, pagination, filter, sort) dataTables set-up using server-side processing. What I'm trying to do is modify my php script that I use for server-side processing so that I can use it for my export.

I've successfully modified my php script to generate a csv file, except I can't figure out how to include the filtering, sorting, etc. My problems lies in the fact that when I call my php script, I am not including (by $_GET) all the special variables generated by dataTables for those purposes. (i.e. iSortingCols , sSearch , iColumns , ...)

My question is therefore how would I go about getting all those variables so that I can serialize them into my _GET request?

I am currently calling the php script from jQuery as such:

document.location.href = '/php_scripts/csv_export.php?query_name='+query_name;

Thank for any help, let me know if I should post more code.

The parameters I'm looking on are listed first on this page: http://datatables.net/usage/server-side