Can I call datable within another datatable call

Can I call datable within another datatable call

knrknr Posts: 1Questions: 1Answers: 0

I want to use the json response of one ajax request I receive from calling datatable for different id. I am getting Uncaught TypeError: Cannot read property 'className' of undefined which is mostly when html headers or rows and response rows don't match.

eg.
var $searchesByIpTable = $('#searches-by-ip-table').dataTable({ sDom: 'T<"clear">lfrtip', oTableTools: { aButtons: [] }, bServerSide: true, bProcessing: true, sAjaxSource: '/usage-data/searches-by-ip?', fnServerData: function (sSource, aoData, fnCallback) { aoData.push({ name: 'dateFrom', value: $('#date-from').val() }); aoData.push({ name: 'dateTo', value: $('#date-to').val() }); queryParameters = aoData; $.ajax({ dataType: 'json', type: 'get', url: '/usage-data/searches-by-ip?', data: aoData, success: function(json){

                        fnCallback(json);

                          $('.searches-by-user-ip-table').dataTable({
                                ajax: json['extra']

                            });

                    }
                });
            },
            aaSorting: [[ 1, 'asc' ]]
        });
This discussion has been closed.