PageRenderTime 48ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/admin-dashboard/assets/advanced-datatable/examples/server_side/defer_loading.html

https://gitlab.com/emad.rashad/mls-grading
HTML | 281 lines | 263 code | 18 blank | 0 comment | 0 complexity | d8df4bcebe98b82e007cf64cfd4972d4 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  5. <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/media/images/favicon.ico" />
  6. <title>DataTables example</title>
  7. <style type="text/css" title="currentStyle">
  8. @import "../../media/css/demo_page.css";
  9. @import "../../media/css/demo_table.css";
  10. </style>
  11. <script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
  12. <script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
  13. <script type="text/javascript" charset="utf-8">
  14. $(document).ready(function() {
  15. $('#example').dataTable( {
  16. "bProcessing": true,
  17. "bServerSide": true,
  18. "sAjaxSource": "scripts/server_processing.php",
  19. "iDeferLoading": 57
  20. } );
  21. } );
  22. </script>
  23. </head>
  24. <body id="dt_example">
  25. <div id="container">
  26. <div class="full_width big">
  27. DataTables server-side processing example with deferred loading
  28. </div>
  29. <h1>Preamble</h1>
  30. <p>When using DataTables with server-side processing the default behaviour is to have DataTables automatically go the server and load the data, removing anything which might already be on the page. However, this behaviour might not always be desirable when the first page of the table has already been preloaded in the HTML. This is achieved by using the <i>iDeferLoading</i> initialisation property. It serves two purposes, firstly to include that deferred loading is required, but also to tell DataTables how many records there are in the full table, in this case 57 (this allows the information element and pagination to be displayed correctly).</p>
  31. <p>In this example the preloaded data is hardcoded in, but you could use a PHP include or anything else to put the data in the table for the first page - DataTables won't process it at all, simply display it and be ready to load the next page / search / sort etc.</p>
  32. <h1>Live example</h1>
  33. <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
  34. <thead>
  35. <tr>
  36. <th width="20%">Rendering engine</th>
  37. <th width="25%">Browser</th>
  38. <th width="25%">Platform(s)</th>
  39. <th width="15%">Engine version</th>
  40. <th width="15%">CSS grade</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <tr>
  45. <td>Gecko</td>
  46. <td>Firefox 1.0</td>
  47. <td>Win 98+ / OSX.2+</td>
  48. <td>1.7</td>
  49. <td>A</td>
  50. </tr>
  51. <tr>
  52. <td>Gecko</td>
  53. <td>Firefox 1.5</td>
  54. <td>Win 98+ / OSX.2+</td>
  55. <td>1.8</td>
  56. <td>A</td>
  57. </tr>
  58. <tr>
  59. <td>Gecko</td>
  60. <td>Firefox 2.0</td>
  61. <td>Win 98+ / OSX.2+</td>
  62. <td>1.8</td>
  63. <td>A</td>
  64. </tr>
  65. <tr>
  66. <td>Gecko</td>
  67. <td>Firefox 3.0</td>
  68. <td>Win 2k+ / OSX.3+</td>
  69. <td>1.9</td>
  70. <td>A</td>
  71. </tr>
  72. <tr>
  73. <td>Gecko</td>
  74. <td>Camino 1.0</td>
  75. <td>OSX.2+</td>
  76. <td>1.8</td>
  77. <td>A</td>
  78. </tr>
  79. <tr>
  80. <td>Gecko</td>
  81. <td>Camino 1.5</td>
  82. <td>OSX.3+</td>
  83. <td>1.8</td>
  84. <td>A</td>
  85. </tr>
  86. <tr>
  87. <td>Gecko</td>
  88. <td>Netscape 7.2</td>
  89. <td>Win 95+ / Mac OS 8.6-9.2</td>
  90. <td>1.7</td>
  91. <td>A</td>
  92. </tr>
  93. <tr>
  94. <td>Gecko</td>
  95. <td>Netscape Browser 8</td>
  96. <td>Win 98SE+</td>
  97. <td>1.7</td>
  98. <td>A</td>
  99. </tr>
  100. <tr>
  101. <td>Gecko</td>
  102. <td>Netscape Navigator 9</td>
  103. <td>Win 98+ / OSX.2+</td>
  104. <td>1.8</td>
  105. <td>A</td>
  106. </tr>
  107. <tr>
  108. <td>Gecko</td>
  109. <td>Mozilla 1.0</td>
  110. <td>Win 95+ / OSX.1+</td>
  111. <td>1</td>
  112. <td>A</td>
  113. </tr>
  114. </tbody>
  115. <tfoot>
  116. <tr>
  117. <th>Rendering engine</th>
  118. <th>Browser</th>
  119. <th>Platform(s)</th>
  120. <th>Engine version</th>
  121. <th>CSS grade</th>
  122. </tr>
  123. </tfoot>
  124. </table>
  125. <div class="spacer"></div>
  126. <h1>Initialisation code</h1>
  127. <pre class="brush: js;">$(document).ready(function() {
  128. $('#example').dataTable( {
  129. "bProcessing": true,
  130. "bServerSide": true,
  131. "sAjaxSource": "scripts/server_processing.php",
  132. "iDeferLoading": 57
  133. } );
  134. } );</pre>
  135. <style type="text/css">
  136. @import "../examples_support/syntax/css/shCore.css";
  137. </style>
  138. <script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
  139. <h1>Server response</h1>
  140. <p>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.</p>
  141. <pre id="latest_xhr" class="brush: js;"></pre>
  142. <h1>Other examples</h1>
  143. <div class="demo_links">
  144. <h2>Basic initialisation</h2>
  145. <ul>
  146. <li><a href="../basic_init/zero_config.html">Zero configuration</a></li>
  147. <li><a href="../basic_init/filter_only.html">Feature enablement</a></li>
  148. <li><a href="../basic_init/table_sorting.html">Sorting data</a></li>
  149. <li><a href="../basic_init/multi_col_sort.html">Multi-column sorting</a></li>
  150. <li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
  151. <li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
  152. <li><a href="../basic_init/complex_header.html">Complex headers - grouping with colspan</a></li>
  153. <li><a href="../basic_init/dom.html">DOM positioning</a></li>
  154. <li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
  155. <li><a href="../basic_init/state_save.html">State saving</a></li>
  156. <li><a href="../basic_init/alt_pagination.html">Alternative pagination styles</a></li>
  157. <li>Scrolling: <br>
  158. <a href="../basic_init/scroll_x.html">Horizontal</a> /
  159. <a href="../basic_init/scroll_y.html">Vertical</a> /
  160. <a href="../basic_init/scroll_xy.html">Both</a> /
  161. <a href="../basic_init/scroll_y_theme.html">Themed</a> /
  162. <a href="../basic_init/scroll_y_infinite.html">Infinite</a>
  163. </li>
  164. <li><a href="../basic_init/language.html">Change language information (internationalisation)</a></li>
  165. <li><a href="../basic_init/themes.html">ThemeRoller themes (Smoothness)</a></li>
  166. </ul>
  167. <h2>Advanced initialisation</h2>
  168. <ul>
  169. <li>Events: <br>
  170. <a href="../advanced_init/events_live.html">Live events</a> /
  171. <a href="../advanced_init/events_pre_init.html">Pre-init</a> /
  172. <a href="../advanced_init/events_post_init.html">Post-init</a>
  173. </li>
  174. <li><a href="../advanced_init/column_render.html">Column rendering</a></li>
  175. <li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
  176. <li><a href="../advanced_init/dom_multiple_elements.html">Multiple table controls (sDom)</a></li>
  177. <li><a href="../advanced_init/length_menu.html">Defining length menu options</a></li>
  178. <li><a href="../advanced_init/complex_header.html">Complex headers and hidden columns</a></li>
  179. <li><a href="../advanced_init/dom_toolbar.html">Custom toolbar (element) around table</a></li>
  180. <li><a href="../advanced_init/highlight.html">Row highlighting with CSS</a></li>
  181. <li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
  182. <li><a href="../advanced_init/row_callback.html">Row callback</a></li>
  183. <li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
  184. <li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
  185. <li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
  186. <li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
  187. <li><a href="../advanced_init/localstorage.html">State saving with localStorage</a></li>
  188. <li><a href="../advanced_init/dt_events.html">Custom events</a></li>
  189. </ul>
  190. <h2>API</h2>
  191. <ul>
  192. <li><a href="../api/add_row.html">Dynamically add a new row</a></li>
  193. <li><a href="../api/multi_filter.html">Individual column filtering (using "input" elements)</a></li>
  194. <li><a href="../api/multi_filter_select.html">Individual column filtering (using "select" elements)</a></li>
  195. <li><a href="../api/highlight.html">Highlight rows and columns</a></li>
  196. <li><a href="../api/row_details.html">Show and hide details about a particular record</a></li>
  197. <li><a href="../api/select_row.html">User selectable rows (multiple rows)</a></li>
  198. <li><a href="../api/select_single_row.html">User selectable rows (single row) and delete rows</a></li>
  199. <li><a href="../api/editable.html">Editable rows (with jEditable)</a></li>
  200. <li><a href="../api/form.html">Submit form with elements in table</a></li>
  201. <li><a href="../api/counter_column.html">Index column (static number column)</a></li>
  202. <li><a href="../api/show_hide.html">Show and hide columns dynamically</a></li>
  203. <li><a href="../api/api_in_init.html">API function use in initialisation object (callback)</a></li>
  204. <li><a href="../api/tabs_and_scrolling.html">DataTables scrolling and tabs</a></li>
  205. <li><a href="../api/regex.html">Regular expression filtering</a></li>
  206. </ul>
  207. </div>
  208. <div class="demo_links">
  209. <h2>Data sources</h2>
  210. <ul>
  211. <li><a href="../data_sources/dom.html">DOM</a></li>
  212. <li><a href="../data_sources/js_array.html">Javascript array</a></li>
  213. <li><a href="../data_sources/ajax.html">Ajax source</a></li>
  214. <li><a href="../data_sources/server_side.html">Server side processing</a></li>
  215. </ul>
  216. <h2>Server-side processing</h2>
  217. <ul>
  218. <li><a href="../server_side/server_side.html">Obtain server-side data</a></li>
  219. <li><a href="../server_side/custom_vars.html">Add extra HTTP variables</a></li>
  220. <li><a href="../server_side/post.html">Use HTTP POST</a></li>
  221. <li><a href="../server_side/ids.html">Automatic addition of IDs and classes to rows</a></li>
  222. <li><a href="../server_side/object_data.html">Reading table data from objects</a></li>
  223. <li><a href="../server_side/row_details.html">Show and hide details about a particular record</a></li>
  224. <li><a href="../server_side/select_rows.html">User selectable rows (multiple rows)</a></li>
  225. <li><a href="../server_side/jsonp.html">JSONP for a cross domain data source</a></li>
  226. <li><a href="../server_side/editable.html">jEditable integration with DataTables</a></li>
  227. <li><a href="../server_side/defer_loading.html">Deferred loading of Ajax data</a></li>
  228. <li><a href="../server_side/pipeline.html">Pipelining data (reduce Ajax calls for paging)</a></li>
  229. </ul>
  230. <h2>Ajax data source</h2>
  231. <ul>
  232. <li><a href="../ajax/ajax.html">Ajax sourced data (array of arrays)</a></li>
  233. <li><a href="../ajax/objects.html">Ajax sourced data (array of objects)</a></li>
  234. <li><a href="../ajax/defer_render.html">Deferred DOM creation for extra speed</a></li>
  235. <li><a href="../ajax/null_data_source.html">Empty data source columns</a></li>
  236. <li><a href="../ajax/custom_data_property.html">Use a data source other than aaData (the default)</a></li>
  237. <li><a href="../ajax/objects_subarrays.html">Read column data from sub-arrays</a></li>
  238. <li><a href="../ajax/deep.html">Read column data from deeply nested properties</a></li>
  239. </ul>
  240. <h2>Plug-ins</h2>
  241. <ul>
  242. <li><a href="../plug-ins/plugin_api.html">Add custom API functions</a></li>
  243. <li><a href="../plug-ins/sorting_plugin.html">Sorting and automatic type detection</a></li>
  244. <li><a href="../plug-ins/sorting_sType.html">Sorting without automatic type detection</a></li>
  245. <li><a href="../plug-ins/paging_plugin.html">Custom pagination controls</a></li>
  246. <li><a href="../plug-ins/range_filtering.html">Range filtering / custom filtering</a></li>
  247. <li><a href="../plug-ins/dom_sort.html">Live DOM sorting</a></li>
  248. <li><a href="../plug-ins/html_sort.html">Automatic HTML type detection</a></li>
  249. </ul>
  250. </div>
  251. <div id="footer" class="clear" style="text-align:center;">
  252. <p>
  253. Please refer to the <a href="http://www.datatables.net/usage">DataTables documentation</a> for full information about its API properties and methods.<br>
  254. Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.
  255. </p>
  256. <span style="font-size:10px;">
  257. DataTables designed and created by <a href="http://www.sprymedia.co.uk">Allan Jardine</a> &copy; 2007-2011<br>
  258. DataTables is dual licensed under the <a href="http://www.datatables.net/license_gpl2">GPL v2 license</a> or a <a href="http://www.datatables.net/license_bsd">BSD (3-point) license</a>.
  259. </span>
  260. </div>
  261. </div>
  262. </body>
  263. </html>