Quantcast
Viewing all articles
Browse latest Browse all 82126

TableTools working only partially

Hi Alan,

This is the best API i have found,so much to learn and possible to do with it.
Really Appreciate your hard work .

I was just facing a small issue in table tool,my excel copy and pdf copy are missing data from it, not exactly figure out why.
Here is my code :

I think issue is something related with other than alphabets ,Pls help ..

<script src="http://www.danvk.org/dragtable/dragtable.js"></script&gt;
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf-8" src="media/js/ZeroClipboard.js"></script>
<script type="text/javascript" charset="utf-8" src="media/js/TableTools.js"></script>
<script type="text/javascript" charset="utf-8">


$(document).ready(function() {

/*
* Insert a 'details' column to the table
*/
var nCloneTh = document.createElement( 'th' );
var nCloneTd = document.createElement( 'td' );
nCloneTd.innerHTML = '<img src="../examples_support/details_open.png">';
nCloneTd.className = "center";

//Here First
$('#example thead tr').each( function () {

this.insertBefore( nCloneTh, this.childNodes[0] );
} );
//Here Second
$('#example tbody tr').each( function () {
this.insertBefore( nCloneTd.cloneNode( true ), this.childNodes[0] );
} );

var oTable = $('#example').dataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath" : "media/swf/copy_csv_xls_pdf.swf",

}


});

} );
</script>

</head>
<body>

<table cellpadding="0" cellspacing="0" border="0" class="display draggable" id="example" width="100%">

<thead>
<tr>
<th>Rendering engine</th>
<th>Rendering engine</th>
<th>Browser</th>
<th>Platform</th>
<th>Engine version</th>
<th>CSS grade</th>
</tr>
</thead>
<tbody>

<tr class="odd gradeX" id="4 ">
<td>Trident</td>
<td>Trident</td>
<td>Internet
Explorer 4.0</td>
<td>Win 95</td>
<td class="center"> 4</td>
<td class="center">X</td>
</tr>
<tr class="even gradeC" id="5">
<td>Trident</td>
<td>Trident</td>
<td>Internet
Explorer 5.0</td>
<td>Win 95+</td>
<td class="center">5</td>
<td class="center">C</td>
</tr>
<tr class="odd gradeA" id="6">
<td>Trident</td>
<td>Trident</td>
<td>Internet
Explorer 5.5</td>
<td>Win 95+</td>
<td class="center">5.5</td>
<td class="center">A</td>
</tr>
<tr class="odd gradeX" id="4 ">
<td>Trident</td>
<td>Trident</td>
<td>Internet
Explorer 4.0</td>
<td>Win 95+</td>
<td class="center"> 4</td>
<td class="center">X</td>
</tr>
<tr class="even gradeC" id="5">
<td>Trident</td>
<td>Trident</td>
<td>Internet
Explorer 5.0</td>
<td>Win 95+</td>
<td class="center">5</td>
<td class="center">C</td>
</tr>
<tr class="odd gradeA" id="6">
<td>Trident</td>
<td>Trident</td>
<td>Internet
Explorer 5.5</td>
<td>Win 95+</td>
<td class="center">5.5</td>
<td class="center">A</td>
</tr>


</table>

</body>
</html>

Viewing all articles
Browse latest Browse all 82126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>