datatables在fnReloadAjax上保留现有的fnServerParams

时间:2012-07-19 17:45:30

标签: jquery

我正在尝试修改fnReloadAjax以保留我之前设置的现有aoData

  fnServerParams:function(aoData) {
     var serializedForm = $('form#searchform').serializeArray();
     for (var n in serializedForm) {
        var tmpobj = serializedForm[n];
        var key = tmpobj['name'];
        var value = tmpobj['value'];
        aoData.push({"name":key,"value":value});
     }
}

并将其重置为

$.fn.dataTableExt.oApi.fnReloadAjax = function ( oSettings, sNewSource, fnCallback,bStandingRedraw )
...
...
...
var aData = []; # reset here

如何获取现有的aData参数而不是将它们重置为空数组?

1 个答案:

答案 0 :(得分:0)

fnReloadAjax()不适用于bServerSide = true