X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fajax%2Fcustom_data_property.html;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fajax%2Fcustom_data_property.html;h=d0798962d4f97c865467e1dcf643501929cc4ee4;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/examples/ajax/custom_data_property.html b/webapp/resources/datatables-1.9.4/examples/ajax/custom_data_property.html new file mode 100644 index 0000000..d079896 --- /dev/null +++ b/webapp/resources/datatables-1.9.4/examples/ajax/custom_data_property.html @@ -0,0 +1,210 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables AJAX source example - reading an arbitrary data source property +
+ +

Preamble

+

By default DataTables will read the data to show in the table from the aaData property of the object returned from the server. By using the initialisation option sAjaxDataProp you can customise this to whatever you wish. This examples shows it being set to 'demo'. Note that this option will also work with server-side processing. Additionally, it is possible to set sAjaxDataProp to be an empty string, which results in DataTables treating the given data source as the table data array (rather than as property of an object).

+ +

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/custom_prop.txt",
+		"sAjaxDataProp": "demo"
+	} );
+} );
+ + + +

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