from PHP server script (a loop from db array)
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!
$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!