X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fajax%2Fajax.html;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fajax%2Fajax.html;h=6942ba522d650126d573eeb7105784199ca9054d;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/examples/ajax/ajax.html b/webapp/resources/datatables-1.9.4/examples/ajax/ajax.html new file mode 100644 index 0000000..6942ba5 --- /dev/null +++ b/webapp/resources/datatables-1.9.4/examples/ajax/ajax.html @@ -0,0 +1,208 @@ + + + + + + + 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 aData 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 engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"sAjaxSource": "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

+ + + + + + +
+ + \ No newline at end of file