X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fserver_side%2Fjsonp.html;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fserver_side%2Fjsonp.html;h=1f00cdd771156157de4fe7b2cda0bc559ba48479;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/examples/server_side/jsonp.html b/webapp/resources/datatables-1.9.4/examples/server_side/jsonp.html new file mode 100644 index 0000000..1f00cdd --- /dev/null +++ b/webapp/resources/datatables-1.9.4/examples/server_side/jsonp.html @@ -0,0 +1,230 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables server-side processing example with JSONP +
+ +

Preamble

+

JSONP is a method of using JSON data from any server, regardless of XSS protection that modern browsers use. It is very useful for being able to retrieve JSON data from any domain name you choose and is easy to integrate with DataTables, thanks to jQuery's Ajax handler, as shown in this example.

+ +

Live example

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Loading data from server
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
$(document).ready(function() {
+	$('#example').dataTable( {
+		"bProcessing": true,
+		"bServerSide": true,
+		"sAjaxSource": "scripts/jsonp.php",
+		"fnServerData": function( sUrl, aoData, fnCallback, oSettings ) {
+			oSettings.jqXHR = $.ajax( {
+				"url": sUrl,
+				"data": aoData,
+				"success": fnCallback,
+				"dataType": "jsonp",
+				"cache": false
+			} );
+		}
+	} );
+} );
+ + + +

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