problem with reloadAjax

problem with reloadAjax

valdezrvaldezr Posts: 49Questions: 0Answers: 0
edited May 2009 in General
I am using ajax reload on this way

$.fn.dataTableExt.oApi.fnReloadAjax = function ( oSettings, sNewSource ) {
alert(sNewSource);
if ( typeof sNewSource != 'undefined' ) {
oSettings.sAjaxSource = sNewSource;
}
this.fnClearTable( this );
this.oApi._fnProcessingDisplay( oSettings, true );
var that = this;

$.getJSON( oSettings.sAjaxSource, null, function(json) {
/* Got the data - add it to the table */
for ( var i=0 ; i

Replies

  • valdezrvaldezr Posts: 49Questions: 0Answers: 0
    *** UPDATE ***

    the problem is that fnReloadAjax sends 2 requests to the server,
    the first one with all the normal parameters:
    http://localhost:8084/admincard/getPinsPagination.do?pin=12&status=noBalance&iColumns=5&sColumns=&iDisplayLength=10&iDisplayStart=0&sSearch=&bEscapeRegex=true&sSearch_0=&bEscapeRegex_0=true&sSearch_1=&bEscapeRegex_1=true&sSearch_2=&bEscapeRegex_2=true&sSearch_3=&bEscapeRegex_3=true&sSearch_4=&bEscapeRegex_4=true&iSortingCols=1&iSortCol_0=0&iSortDir_0=asc

    and the second,immediatly after the first one, only with my own parameters?
    http://localhost:8084/admincard/getPinsPagination.do?pin=12&status=noBalance

    is that a bug or what I am making wrong?
  • allanallan Posts: 61,734Questions: 1Answers: 10,111 Site admin
    It sounds like you might be using server-side processing - in which case you don't want to be using fnReloadAjax. Have a look at the post here: http://datatables.net/forums/comments.php?DiscussionID=53&page=1#Item_33 where this is discussed further.

    Allan
This discussion has been closed.