Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82263

fnReloadAjax callback not working

$
0
0
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.

 
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 ();


Viewing all articles
Browse latest Browse all 82263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>