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 - Setting the SWF path</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',
28 "sSwfPath": "../swf/copy_csv_xls_pdf.swf"
37 <body class="dt-example">
38 <div class="container">
40 <h1>TableTools example <span>Setting the SWF path</span></h1>
43 <p>TableTools uses a Flash SWF file to provide the ability to copy text to the system clipboard and save files locally. TableTools must be able to load the SWF
44 file in order to provide these facilities. If you aren't using the same directory structure as the TableTools package, you will need to set the
45 <code>sSwfPath</code> TableTools parameter, as shown in this example.</p>
47 <p>Note that TableTools ships with two different SWF files - the only difference between them is that one of them provides the ability to save PDF files while the
48 other doesn't. The trade off is that the PDF capable file is significantly larger in size (56K v 2K).</p>
51 <table id="example" class="display" cellspacing="0" width="100%">
77 <td>System Architect</td>
84 <td>Garrett Winters</td>
93 <td>Junior Technical Author</td>
94 <td>San Francisco</td>
100 <td>Cedric Kelly</td>
101 <td>Senior Javascript Developer</td>
116 <td>Brielle Williamson</td>
117 <td>Integration Specialist</td>
124 <td>Herrod Chandler</td>
125 <td>Sales Assistant</td>
126 <td>San Francisco</td>
132 <td>Rhona Davidson</td>
133 <td>Integration Specialist</td>
140 <td>Colleen Hurst</td>
141 <td>Javascript Developer</td>
142 <td>San Francisco</td>
149 <td>Software Engineer</td>
157 <td>Office Manager</td>
165 <td>Support Lead</td>
172 <td>Charde Marshall</td>
173 <td>Regional Director</td>
174 <td>San Francisco</td>
180 <td>Haley Kennedy</td>
181 <td>Senior Marketing Designer</td>
188 <td>Tatyana Fitzpatrick</td>
189 <td>Regional Director</td>
196 <td>Michael Silva</td>
197 <td>Marketing Designer</td>
205 <td>Chief Financial Officer (CFO)</td>
212 <td>Gloria Little</td>
213 <td>Systems Administrator</td>
220 <td>Bradley Greer</td>
221 <td>Software Engineer</td>
229 <td>Personnel Lead</td>
236 <td>Jenette Caldwell</td>
237 <td>Development Lead</td>
245 <td>Chief Marketing Officer (CMO)</td>
252 <td>Caesar Vance</td>
253 <td>Pre-Sales Support</td>
260 <td>Doris Wilder</td>
261 <td>Sales Assistant</td>
268 <td>Angelica Ramos</td>
269 <td>Chief Executive Officer (CEO)</td>
284 <td>Jennifer Chang</td>
285 <td>Regional Director</td>
292 <td>Brenden Wagner</td>
293 <td>Software Engineer</td>
294 <td>San Francisco</td>
301 <td>Chief Operating Officer (COO)</td>
302 <td>San Francisco</td>
309 <td>Regional Marketing</td>
316 <td>Michelle House</td>
317 <td>Integration Specialist</td>
332 <td>Prescott Bartlett</td>
333 <td>Technical Author</td>
340 <td>Gavin Cortez</td>
342 <td>San Francisco</td>
348 <td>Martena Mccray</td>
349 <td>Post-Sales support</td>
356 <td>Unity Butler</td>
357 <td>Marketing Designer</td>
358 <td>San Francisco</td>
364 <td>Howard Hatfield</td>
365 <td>Office Manager</td>
366 <td>San Francisco</td>
372 <td>Hope Fuentes</td>
374 <td>San Francisco</td>
380 <td>Vivian Harrell</td>
381 <td>Financial Controller</td>
382 <td>San Francisco</td>
388 <td>Timothy Mooney</td>
389 <td>Office Manager</td>
396 <td>Jackson Bradshaw</td>
404 <td>Olivia Liang</td>
405 <td>Support Engineer</td>
413 <td>Software Engineer</td>
420 <td>Sakura Yamamoto</td>
421 <td>Support Engineer</td>
436 <td>Finn Camacho</td>
437 <td>Support Engineer</td>
438 <td>San Francisco</td>
444 <td>Serge Baldwin</td>
445 <td>Data Coordinator</td>
452 <td>Zenaida Frank</td>
453 <td>Software Engineer</td>
460 <td>Zorita Serrano</td>
461 <td>Software Engineer</td>
462 <td>San Francisco</td>
468 <td>Jennifer Acosta</td>
469 <td>Junior Javascript Developer</td>
476 <td>Cara Stevens</td>
477 <td>Sales Assistant</td>
484 <td>Hermione Butler</td>
485 <td>Regional Director</td>
493 <td>Systems Administrator</td>
500 <td>Jonas Alexander</td>
502 <td>San Francisco</td>
509 <td>Regional Director</td>
516 <td>Michael Bruce</td>
517 <td>Javascript Developer</td>
524 <td>Donna Snider</td>
525 <td>Customer Support</td>
535 <li class="active">Javascript</li>
539 <li>Server-side script</li>
544 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
545 $('#example').DataTable( {
546 dom: 'T<"clear">lfrtip',
548 "sSwfPath": "../swf/copy_csv_xls_pdf.swf"
553 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
556 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
557 <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
558 <li><a href="../js/dataTables.tableTools.js">../js/dataTables.tableTools.js</a></li>
563 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
568 <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
569 additional CSS used is shown below:</p><code class="multiline language-css"></code>
572 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
575 <li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
576 <li><a href="../css/dataTables.tableTools.css">../css/dataTables.tableTools.css</a></li>
581 <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
586 <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
587 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
588 documentation</a>.</p>
596 <div class="gradient"></div>
599 <h2>Other examples</h2>
602 <div class="toc-group">
603 <h3><a href="./index.html">Examples</a></h3>
604 <ul class="toc active">
605 <li><a href="./simple.html">Basic initialisation</a></li>
606 <li class="active"><a href="./swf_path.html">Setting the SWF path</a></li>
607 <li><a href="./new_init.html">Initialisation with `new`</a></li>
608 <li><a href="./defaults.html">Defaults</a></li>
609 <li><a href="./select_single.html">Row selection - single row select</a></li>
610 <li><a href="./select_multi.html">Row selection - multi-row select</a></li>
611 <li><a href="./select_os.html">Row selection - operating system style</a></li>
612 <li><a href="./select_column.html">Row selection - row selector on specific cells</a></li>
613 <li><a href="./multiple_tables.html">Multiple tables</a></li>
614 <li><a href="./multi_instance.html">Multiple toolbars</a></li>
615 <li><a href="./collection.html">Button collections</a></li>
616 <li><a href="./plug-in.html">Plug-in button types</a></li>
617 <li><a href="./button_text.html">Custom button text</a></li>
618 <li><a href="./alter_buttons.html">Button arrangement</a></li>
619 <li><a href="./ajax.html">Ajax loaded data</a></li>
620 <li><a href="./pdf_message.html">PDF message</a></li>
621 <li><a href="./bootstrap.html">Bootstrap styling</a></li>
622 <li><a href="./jqueryui.html">jQuery UI styling</a></li>
627 <div class="epilogue">
628 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
629 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>
630 which extend the capabilities of DataTables.</p>
632 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
633 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>