Send table data back to server for export

Send table data back to server for export

buzbybuzby Posts: 1Questions: 0Answers: 0
edited October 2010 in General
Hi everyone!
I want to be able to send the currently filtered, sorted data from a datatable back to the server, so that once on the server I can process it (ultimately into an Excel file, but I can't use TableTools because of the way I need to format the data..).
I assume I need to do something with fnGetFilteredNodes and serialize the data in some way to post it back to the server for processing.. has anyone got any clues? I'm a bit of a newbie with jQuery / web dev in general so be gentle with me!

Replies

  • mstrandmstrand Posts: 24Questions: 0Answers: 0
    I once started down the road of attempting to send data back to the server to create an Excel spreadsheet, but then the requirements of the project changed so I didn't actually get very far with it.

    I was using fnGetFileredData and then looping through the results to build up the data in JSON structure. I'm pretty awful at JavaScript myself so I'd like to see some other solutions, but here is a function from my notes that was working as far as it goes...
    [code]

    $(document).ready( function() {
    $('#classSummary').click( function () {
    var myTable=new Array();
    var myJSON;
    myJSON = '{"bindings": [';
    var aNodes = oTable.fnGetFilteredData();
    for ( var i=0, iLen=aNodes.length ; i
This discussion has been closed.