fnReloadAjax (as noted in its documentation) shouldn't be used with server-side processing (which you must be using if you are using sEcho etc). To reload the table with server-side processing, just call fnDraw .
[/code]
with this i create "aoColumns"
[code]
<?php
@require ('.\scripts\colonne.php');
$num = mysql_num_fields( $result );
$mData="{\"mDataProp\":\"0\"},";
for ($i=1; $i<$num;$i++){
$mData=$mData."{\"mDataProp\":\"".$i."\", \"bVisible\":false },";
}
?>
[/code]
button "agggiornata" calls "add_column" and add one column into a database[tested], but when calls .fnDraw() callback the old Draw without refresh, could you help me?
Replies
Allan
[code]
$(document).ready(function(){
$("#agggiornata").click(function(){
$.ajax({
url: "./scripts/add_column.php"
});
$oTable.fnDraw();
});
$oTable=$('#tabella1').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"H"Clr>t<"F"ip>',
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/server_processing.php",
"aoColumns":[<?php echo ($mData); ?>]
});
});
[/code]
with this i create "aoColumns"
[code]
<?php
@require ('.\scripts\colonne.php');
$num = mysql_num_fields( $result );
$mData="{\"mDataProp\":\"0\"},";
for ($i=1; $i<$num;$i++){
$mData=$mData."{\"mDataProp\":\"".$i."\", \"bVisible\":false },";
}
?>
[/code]
button "agggiornata" calls "add_column" and add one column into a database[tested], but when calls .fnDraw() callback the old Draw without refresh, could you help me?