5 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6 <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
8 <title>TableTools example - Multiple toolbars</title>
9 <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10 <link rel="stylesheet" type="text/css" href="../css/dataTables.tableTools.css">
11 <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
12 <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
13 <style type="text/css" class="init">
16 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
17 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
18 <script type="text/javascript" language="javascript" src="../js/dataTables.tableTools.js"></script>
19 <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
20 <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
21 <script type="text/javascript" language="javascript" class="init">
24 $(document).ready(function() {
25 $('#example').DataTable( {
26 dom: 'T<"clear">lfrtip<"clear spacer">T',
28 "aButtons": [ "copy", "print" ]
37 <body class="dt-example">
38 <div class="container">
40 <h1>TableTools example <span>Multiple toolbars</span></h1>
43 <p>Like all DataTables control elements, TableTools can have multiple instances specified in the <a href="//datatables.net/reference/option/dom"><code class=
44 "option" title="DataTables initialisation option">dom<span>DT</span></code></a> parameter of DataTables. This will create two TableTools toolbars next to the
45 table, providing the same functions.</p>
47 <p>An example of when this might be useful is to show the toolbar both above and below the table - as is done in this example.</p>
50 <table id="example" class="display" cellspacing="0" width="100%">
76 <td>System Architect</td>
83 <td>Garrett Winters</td>
92 <td>Junior Technical Author</td>
93 <td>San Francisco</td>
100 <td>Senior Javascript Developer</td>
115 <td>Brielle Williamson</td>
116 <td>Integration Specialist</td>
123 <td>Herrod Chandler</td>
124 <td>Sales Assistant</td>
125 <td>San Francisco</td>
131 <td>Rhona Davidson</td>
132 <td>Integration Specialist</td>
139 <td>Colleen Hurst</td>
140 <td>Javascript Developer</td>
141 <td>San Francisco</td>
148 <td>Software Engineer</td>
156 <td>Office Manager</td>
164 <td>Support Lead</td>
171 <td>Charde Marshall</td>
172 <td>Regional Director</td>
173 <td>San Francisco</td>
179 <td>Haley Kennedy</td>
180 <td>Senior Marketing Designer</td>
187 <td>Tatyana Fitzpatrick</td>
188 <td>Regional Director</td>
195 <td>Michael Silva</td>
196 <td>Marketing Designer</td>
204 <td>Chief Financial Officer (CFO)</td>
211 <td>Gloria Little</td>
212 <td>Systems Administrator</td>
219 <td>Bradley Greer</td>
220 <td>Software Engineer</td>
228 <td>Personnel Lead</td>
235 <td>Jenette Caldwell</td>
236 <td>Development Lead</td>
244 <td>Chief Marketing Officer (CMO)</td>
251 <td>Caesar Vance</td>
252 <td>Pre-Sales Support</td>
259 <td>Doris Wilder</td>
260 <td>Sales Assistant</td>
267 <td>Angelica Ramos</td>
268 <td>Chief Executive Officer (CEO)</td>
283 <td>Jennifer Chang</td>
284 <td>Regional Director</td>
291 <td>Brenden Wagner</td>
292 <td>Software Engineer</td>
293 <td>San Francisco</td>
300 <td>Chief Operating Officer (COO)</td>
301 <td>San Francisco</td>
308 <td>Regional Marketing</td>
315 <td>Michelle House</td>
316 <td>Integration Specialist</td>
331 <td>Prescott Bartlett</td>
332 <td>Technical Author</td>
339 <td>Gavin Cortez</td>
341 <td>San Francisco</td>
347 <td>Martena Mccray</td>
348 <td>Post-Sales support</td>
355 <td>Unity Butler</td>
356 <td>Marketing Designer</td>
357 <td>San Francisco</td>
363 <td>Howard Hatfield</td>
364 <td>Office Manager</td>
365 <td>San Francisco</td>
371 <td>Hope Fuentes</td>
373 <td>San Francisco</td>
379 <td>Vivian Harrell</td>
380 <td>Financial Controller</td>
381 <td>San Francisco</td>
387 <td>Timothy Mooney</td>
388 <td>Office Manager</td>
395 <td>Jackson Bradshaw</td>
403 <td>Olivia Liang</td>
404 <td>Support Engineer</td>
412 <td>Software Engineer</td>
419 <td>Sakura Yamamoto</td>
420 <td>Support Engineer</td>
435 <td>Finn Camacho</td>
436 <td>Support Engineer</td>
437 <td>San Francisco</td>
443 <td>Serge Baldwin</td>
444 <td>Data Coordinator</td>
451 <td>Zenaida Frank</td>
452 <td>Software Engineer</td>
459 <td>Zorita Serrano</td>
460 <td>Software Engineer</td>
461 <td>San Francisco</td>
467 <td>Jennifer Acosta</td>
468 <td>Junior Javascript Developer</td>
475 <td>Cara Stevens</td>
476 <td>Sales Assistant</td>
483 <td>Hermione Butler</td>
484 <td>Regional Director</td>
492 <td>Systems Administrator</td>
499 <td>Jonas Alexander</td>
501 <td>San Francisco</td>
508 <td>Regional Director</td>
515 <td>Michael Bruce</td>
516 <td>Javascript Developer</td>
523 <td>Donna Snider</td>
524 <td>Customer Support</td>
534 <li class="active">Javascript</li>
538 <li>Server-side script</li>
543 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
544 $('#example').DataTable( {
545 dom: 'T<"clear">lfrtip<"clear spacer">T',
547 "aButtons": [ "copy", "print" ]
552 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
555 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
556 <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
557 <li><a href="../js/dataTables.tableTools.js">../js/dataTables.tableTools.js</a></li>
562 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
567 <p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
568 additional CSS used is shown below:</p><code class="multiline language-css"></code>
571 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
574 <li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
575 <li><a href="../css/dataTables.tableTools.css">../css/dataTables.tableTools.css</a></li>
580 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
585 <p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
586 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
587 documentation</a>.</p>
595 <div class="gradient"></div>
598 <h2>Other examples</h2>
601 <div class="toc-group">
602 <h3><a href="./index.html">Examples</a></h3>
603 <ul class="toc active">
604 <li><a href="./simple.html">Basic initialisation</a></li>
605 <li><a href="./swf_path.html">Setting the SWF path</a></li>
606 <li><a href="./new_init.html">Initialisation with `new`</a></li>
607 <li><a href="./defaults.html">Defaults</a></li>
608 <li><a href="./select_single.html">Row selection - single row select</a></li>
609 <li><a href="./select_multi.html">Row selection - multi-row select</a></li>
610 <li><a href="./select_os.html">Row selection - operating system style</a></li>
611 <li><a href="./select_column.html">Row selection - row selector on specific cells</a></li>
612 <li><a href="./multiple_tables.html">Multiple tables</a></li>
613 <li class="active"><a href="./multi_instance.html">Multiple toolbars</a></li>
614 <li><a href="./collection.html">Button collections</a></li>
615 <li><a href="./plug-in.html">Plug-in button types</a></li>
616 <li><a href="./button_text.html">Custom button text</a></li>
617 <li><a href="./alter_buttons.html">Button arrangement</a></li>
618 <li><a href="./ajax.html">Ajax loaded data</a></li>
619 <li><a href="./pdf_message.html">PDF message</a></li>
620 <li><a href="./bootstrap.html">Bootstrap styling</a></li>
621 <li><a href="./jqueryui.html">jQuery UI styling</a></li>
626 <div class="epilogue">
627 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
628 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>
629 which extend the capabilities of DataTables.</p>
631 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
632 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>