Datatables ajaxSource load twice

Datatables ajaxSource load twice

arunkarthik92arunkarthik92 Posts: 1Questions: 0Answers: 0

Hi
I am using datatables 1.9 and my ajax source is called twice. But this occurs onlywhen the page loads for the first time. On any subsequent operations ajaxSource is called once.

oTable = $('#UserDetailsTable').dataTable({
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": fetch_user_details_url + "/" + time_limit,
//"sDom": 'l<"crumb">rftip',
"fnServerData": function (sSource, aoData, fnCallback) {
/* Add filter data and graph selection query to send to the server before send */

        aoData.push({some json});
        $.getJSON( sSource, aoData, function (json) { 

        });
    },

    "aoColumnDefs": [ 
                        {
                            "fnRender" : function(oObj, sVal) {
                                var aData = oObj.aData;
                                var deviceTable = fnUserDeviceDetails(aData);
                                return '<a href="'+usersViewUrl+'/'+aData[8].split('@@')[0]+'">'+aData[0]+'</a> <div class="row_displayer">' + userDeviceCountsText + imageOpenUrl + '</div>' + deviceTable;
                            },
                            "aTargets": [0]
                        },
                        {
                            "fnRender" : function(oObj, sVal) {
                                var aData = oObj.aData;
                                return '<a href="'+surveysViewUrl+'/'+aData[8].split('@@')[1]+'">'+aData[1]+'</a>';
                            },
                            "aTargets": [1]
                        },
                        {
                            "fnRender" : function(oObj, sVal) {
                                var aData = oObj.aData;
                                return '<a href="'+surveysViewUrl+'/'+aData[8].split('@@')[1]+'">'+aData[2]+'</a>';
                            },
                            "aTargets": [2]
                        },
                        {
                            "fnRender" : function(oObj, sVal) {
                                var aData = oObj.aData;
                                var data = aData[3].split('@@');
                                if(data.length > 1){
                                    return '<a href="'+wavesViewUrl+'/'+data[0]+'">'+data[1]+'</a>';
                                }
                                return '';
                            },
                            "bSortable":false,
                            "bSearchable":false,
                            "aTargets": [3]
                        },
                        {
                            "fnRender" : function(oObj, sVal) {
                                var aData = oObj.aData;
                                var data = aData[4].split('@@');
                                if(data.length > 1){
                                    return '<a href="'+wavesViewUrl+'/'+data[0]+'">'+data[1]+'</a>';
                                }
                                return '';
                            },
                            "bSortable":false,
                            "bSearchable":false,
                            "aTargets": [4]
                        },
                        {
                            "bSortable":false,
                            "aTargets": [5]
                        },
                        {
                            "bSortable":false,
                            "aTargets": [6]
                        },
                        {
                            "bSortable":false,
                            "bSearchable":false,
                            "bVisible":false,
                            "aTargets": [7]
                        },
                        {
                            "bSortable":false,
                            "bSearchable":false,
                            "bVisible":false,
                            "aTargets": [8]
                        }],
    "fnDrawCallback" : function(oSettings) {

    },
    "oLanguage": {
        "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
        "sInfoFiltered": " (filtered from _MAX_ total entries)",
        '
    }
    });
This discussion has been closed.