aoServerParams - Access oSettings inside the fn function

aoServerParams - Access oSettings inside the fn function

DoltscheDoltsche Posts: 9Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
Hello community

I'm working on some kind of an filter plugin which allows to specify several search boxes on top of the datatables table.
Thanks to aoServerParams, I can push a function which then will pass the content of the added textboxes to the ajax request. Or this is how I thought I can achieve it. There is one problem:

How can I access the oSettings object from within to fn function?
Because there would be the number of textboxes, which I need to iterate in order to pass their value to aoData

[code]
(function (window, document, $, undefined) {
$.fn.dataTable.AdvancedFilter = function (oSettings) {
[...]
oSettings.aoServerParams.push({
"sName": "advancedFilter",
"fn": function (aoData) {
aoData.push({
"name": "...",
"value": "..."
});
}
});
})(window, document, jQuery);
[/code]

Or is there even a better approach for what I'd like to achieve?

Best regards

Samuel
This discussion has been closed.