ajax: {
url: this._listingURL,
method: 'POST',
data: {
fromDate: "",
toDate: "",
},
dataSrc: function (json) {
let json = json;
json.recordsTotal = json.data.length;
json.recordsFiltered = json.data.length;
json.draw = json.data.draw;
var return_data = new Array();
for (var i = 0; i < json.data.length; i++) {
return_data.push({
'id': json.data[i].id,
'srNo': json.data[i].srNo,
'branchId': json.data[i].branchId,
'branchName': json.data[i].branchName,
'centerId': json.data[i].centerId,
'centerName': json.data[i].centerName,
'noOfLoans': json.data[i].noOfLoans,
'staus': json.data[i].staus
})
}
return return_data;
}
},
How To Modifiy the responce data in DataTable ( dataSrc)
Call JavaScript Function at particular interval
<html>
<head>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<div id="div1">
</div>
</body>
<script type="text/javascript">
$(document).ready(function () {
var interval = setInterval(callAjax, 10);
function callAjax() {
$.ajax({url: "http://www.delveaxis.com/", success: function (result) {
// $("#div1").html(result);
}});
}
});
</script>
</html>
Subscribe to:
Posts (Atom)