I have some code and when i click in the "+" button of the table it will display the ID of the row. But, the Javascript code only stores the last result from the DB.
<script type="text/javascript">
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
sOut += '<tr><td>Estado:</td><td><?php echo $row['ID'] ?></td></tr>';
sOut += '</table>';
return sOut;
}
</script>
<table>
<thead>
<tr>
<th>ID</th>
<th>Evento</th>
<th>Nome</th>
</tr>
</thead>
<tbody>
<?php
while( $row = mysql_fetch_assoc( $result ) ){
echo
" <tr>
<td>{$row['ID']}</td>
<td>{$row['Evento']}</td>
<td>{$row['Nome']}</td>
</tr>\n";
}
?>
</tbody>
</table>
I'm kind of stuck in this... Thanks for any help.