Hi everyone,
I have got a page where I load applications based on it's status.I have got two tabs 'Accepted' and 'Pending', and I reload the datatable when the tabs are clicked.I'm using the fnReloadAjax plugin to do it but for some reason the callback function is not working.Would some one please advice the reason for it.
I have got a page where I load applications based on it's status.I have got two tabs 'Accepted' and 'Pending', and I reload the datatable when the tabs are clicked.I'm using the fnReloadAjax plugin to do it but for some reason the callback function is not working.Would some one please advice the reason for it.
function Applications(){ var THIS = this; this.getApplications = function(keywordsElem){ this.applicationsList = $('#applicationsList ').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": 'http://cms.com/api/private/dev/getApplications?status=a', "aoColumns": [ {"mDataProp": "applicationid", "sWidth": "110px"}, {"mDataProp": "applicant", "sWidth": "350px" } ], "sPaginationType": "full_numbers", "bLengthChange": false, "iDisplayLength": 10, "oLanguage": { "sProcessing": "Loading Applications", "sInfo": "Total Applications : _TOTAL_, now showing _START_ to _END_" }, "aaSorting": [[ 0, "asc" ]] }); $('.tabs').on('click',function(){ var applicationstatus = $(this).data('applicationstatus'); THIS.applicationsList.fnReloadAjax('http://cms.com/api/private/dev/getApplications?status=' + applicationstatus ,function(){ console.log('applications loaded');//call back not working }); }) } } var applications = new Applications(); applications.getApplications ();