annotate DataTables-1.9.4/extras/Scroller/large_js_source.html @ 1:440f4aa3db97 draft

Added option to dowload iReports
author saskia-hiltemann
date Wed, 30 Jul 2014 07:03:43 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 <html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 <head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <title>DataTables example</title>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 <style type="text/css">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 @import "../../media/css/demo_page.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 @import "../../media/css/demo_table.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 @import "media/css/dataTables.scroller.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 <script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 <script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 <script type="text/javascript" language="javascript" src="media/js/dataTables.scroller.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 <script type="text/javascript" charset="utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 $(document).ready(function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 var aaData = [];
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 for ( var i=0 ; i<50000 ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 aaData.push( [ i, i, i, i, i ] );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 "aaData": aaData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 "sDom": "frtiS",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 "bDeferRender": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 </script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 <body id="dt_example">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 <div id="container" style="width:980px">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 <div class="full_width big">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 Scroller example - 50'000 rows
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 <h1>Preamble</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 <p>This example is completely artificial in that the data generated is created on the client-side by just looping around a Javascript array and then passing that to DataTables. However, it does show quite nicely that DataTables and Scroller can cope with large amounts of data on the client-side quite nicely. Typically data such as this would be Ajax sourced and server-side processing should be considered. Please be aware that the performance of this page will depend on your browser - for example IE6 will crawl!</p>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 <h1>Live example</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 <div id="demo">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 <th>Column 1</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 <th>Column 2</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 <th>Column 3</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 <th>Column 4</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 <th>Column 5</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 </table>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 <div class="spacer"></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 <h1>Initialisation code</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 <pre>$(document).ready(function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 var aaData = [];
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 for ( var i=1 ; i&lt;50000 ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 aaData.push( [ i, i, i, i, i ] );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 "aaData": aaData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 "sDom": "frtiS",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69 "bDeferRender": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 <h1>Other examples</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 <div class="demo_links">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 <li><a href="index.html">Basic initialisation of Scroller</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 <li><a href="state_saving.html">State saving</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 <li><a href="api_scrolling.html">API - pragmatically move to a row</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 <li><a href="server-side_processing.html">Server-side processing with Scroller</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 <li><a href="large_js_source.html">50'000 rows in a table - client-side generated data</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 </body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 </html>