Add an extra parameter to request before calling fnDraw?
Add an extra parameter to request before calling fnDraw?
Hello all,
Quick question. I've assigned a callback to the onclick of a button wich must reload the table (this is a serverside handled datatable) but I must add an extra parameter to the query before doing the ajax request.
What I have so far (after checking docs and forum) is:
[code]$('#highlightsBtn').click(function() {
oTable.fnSettings().aoData.push({"name": 'highlight', "value":'true'});
oTable.fnDraw();
});[/code]
but I'm getting an error in Firebug, I think I should do something else in order to properly add the parameter but I'm lost as to how.
Thanks in advance,
Xabier Burgos.
Quick question. I've assigned a callback to the onclick of a button wich must reload the table (this is a serverside handled datatable) but I must add an extra parameter to the query before doing the ajax request.
What I have so far (after checking docs and forum) is:
[code]$('#highlightsBtn').click(function() {
oTable.fnSettings().aoData.push({"name": 'highlight', "value":'true'});
oTable.fnDraw();
});[/code]
but I'm getting an error in Firebug, I think I should do something else in order to properly add the parameter but I'm lost as to how.
Thanks in advance,
Xabier Burgos.
This discussion has been closed.
Replies
Allan
I've already done that but on top of it, I have a button that when cliked should trigger a reload (ajax request) of the table adding an extra parameter to that request. Is that possible?
Thanks a lot,
Xabier.
Allan