Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81990

Exclude definded Text/HTML in exports (pdf, cvs etc) in each row

$
0
0
from PHP server script (a loop from db array)

$qTable .= '
<tr>
<td >'.$row['id'].'</td>
<td>'.$row['section'].'</td>
<td><p>'.cuttext($row['question'],140).'</p><p class="hideOnExport">HIDE THIS IN TABLETOOLS OUTPUT</p>/td>
<td >'.$row['essential'].'<span class="hideOnExport">HIDE THIS IN TABLETOOLS OUTPUT</span></td>
<td>'.$row['optional'].'<span class="hideOnExport">HIDE THIS IN TABLETOOLS OUTPUT</span></td>
</tr>
';

Any help? See above. All I would like to know is how do I hide something on export for datatools (but yet show it in the table on screen)

Is the answer in _fnGetDataTablesData loop

/* Strip newlines, replace img tags with alt attr. and finally strip html... */
sLoopData = mTypeData.replace(/\n/g," ");
sLoopData =
sLoopData.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi, '$1$2$3');
sLoopData = sLoopData.replace( /<.*?>/g, "" );


ANY HELP?
Keep the excellent work going!

Viewing all articles
Browse latest Browse all 81990

Trending Articles



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