Get table array to work with

Get table array to work with

YuriiYurii Posts: 16Questions: 0Answers: 0
edited June 2012 in General
Hi, I need to get the (json?) array that is crerate with this code:

[code]var oTable = $('#tab_show').dataTable( {
"aaSorting": [ [11,'asc'] ],
"sDom": '<"top"lpf>rt<"bottom"ip><"clear">'
} );[/code]

I need it, because I have to sort data to make a smaller json array and send it via POST to another page.
Using Firebug to check the script, I've seen that the full table is in oTable[0].outerHTML. Is there a way to get it as array?

Thanks

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Have a look at fnGetData .

    Allan
  • YuriiYurii Posts: 16Questions: 0Answers: 0
    Thank yo uso much! Donation sent ;)
  • YuriiYurii Posts: 16Questions: 0Answers: 0
    a little problem Allan: When the page is loaded, I make some changes on the table, for example I have a input field, that on blur, its value is saved to a cell of the same row.
    When I use fnGetData, I found the original value of that cell, but not that I just put in it. And also the value of the input field, I read the original value, but not the last typed input... Is there something to update the oTable object?
  • YuriiYurii Posts: 16Questions: 0Answers: 0
    Ok, I worked it out with fnUpdate :)
This discussion has been closed.