How to push data to aoData before fnReloadAjax

How to push data to aoData before fnReloadAjax

nicsoftnicsoft Posts: 37Questions: 0Answers: 0
edited February 2012 in General
When initiating the table I do include this

[code]"sAjaxSource": "http://" + hostname + "/" + compdir + "/modules/core/ticket/get_ticket_list.php",
"fnServerParams": function (aoData) {
aoData.push({"name":"show_closed", "value":show_closed});
aoData.push({"name":"page", "value":page});
},[/code]

No problems, the data is sent to the server.

But once in a while I want to do a fnReloadAjax and before doing that I need to update the 'show_closed' and 'page' variable that should be sent to the server.

The aoData is not within the scope outside the init of the table, hence I cannot use aoData.push() anywhere else.

I did try to update the 'show_closed' and 'page' variable before fnReloadAjax. This part is a bit strange, if I don't update, I don't get any errors (data is still retained, I can get the same values as when initiaded on the server side). If i do update, I get the error 'aData is undefined'. Firebug is pointing to row 627 in jQuery.dataTables.js (which is 'for ( var i=0 ; i

Replies

This discussion has been closed.