/home/techb158/immovalet.ca/report/bower_components/datatables/examples/data_sources
NameSizeModeActions
ajax.html112510666editdlrm
dom.html198820666editdlrm
js_array.html149680666editdlrm
server_side.html163790666editdlrm
Edit: /home/techb158/immovalet.ca/report/bower_components/datatables/examples/data_sources/ajax.html (11251B)
DataTables example
DataTables AJAX source example

Preamble

Although DataTables is built from the principle of progressive enhancement, it is often useful to be able to construct a table from an AJAX source. This can be done in one of two ways - either using the aaData initialisation parameter which takes an array of data, or using the sAjaxSource initialisation parameter which will have DataTables go to that source with an XHR call and load data from there. This example shows the latter method in action. DataTables expects an object with an array called "aaData" with the data source.

Live example

Rendering engine Browser Platform(s) Engine version CSS grade
Rendering engine Browser Platform(s) Engine version CSS grade

Initialisation code

$(document).ready(function() {
	$('#example').dataTable( {
		"bProcessing": true,
		"sAjaxSource": '../ajax/sources/arrays.txt'
	} );
} );

Server response

The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.


			
			
			

Other examples