2013-10-23 74 views
1
改变Ajaxsource

我已经把我的数据表,如下面的脚本通过组合框

$('#example').dataTable({ 
       'bProcessing': true, 
       'bServerSide': true, 
       'bAutoWidth': false, 
       'sAjaxSource': 'code1.php' 
}); 

我想改变这种ajaxsource(刷新数据表),每次用户在我的应用程序更改ComboBox,所以我加了下面

脚本
$("#cmbo").change(function() { 
      var a = $("#cmbo").val(); 
      var newUrl = 'code2.php?act='+a; 
      $('#example').fnReloadAjax(newUrl); 
}); 

问题是.. datatables没有显示任何更改。 没有刷新表,没有进程。 我需要在用户更改组合框时让我的数据表中的内容发生更改。

谢谢

回答