2016-09-16 63 views
0

我有以下代码:服务器端的数据表崩溃的处理

<script type="text/javascript"> 
    $(document).ready(function(){ 
     $('#browseListings').DataTable({ 
      "processing":"true", 
      "serverSide":"true", 
      "ajax":"http://localhost//htdocs/index.php/admin/ajaxbrowse" 
     }); 
    }); 
</script> 

<table border="0" cellpadding="2" cellspacing="1" class="datable_table display" id="browseListings"> 
    <thead> 
     <tr> 
     <th>Company Name</th><th>Country</th><th>Listing Type</th> <th>Actions</th></tr> 
    </thead> 
</table>  

在页面加载它正确地给我的第一个10个条目但是当我pagniate它只是挂在“正在处理”。我知道它以与第一页相同的格式从控制台返回数据,所以我错过了什么?从手册看,你不需要设置列 - 它应该只是简单的工作?

+0

无疑会在控制台中显示错误,请显示它。 – markpsmith

+0

JS控制台或萤火虫没有错误 – UKUser35

回答

0

好的,这里的问题是绘制需要增加,我已经硬编码到1!我使用自己的自定义服务器端脚本,并包含绘制,但未将其设置为匹配入站(尽管按照建议将其转换为int)。

+0

感谢您分享您的答案 –