problem with serverside

problem with serverside

jiweijiwei Posts: 4Questions: 0Answers: 0
edited January 2010 in General
i got a problem,i wrote the code like the under,but if i reload the page,i found the number of the table is less than the data in database,i guess,the js didnt get data from serverside ,maybe data in cache or what wrong i had.
i am not good at english,i hope someone can understand and helpme.thank you

var oTable;

oTable =$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"aaSorting": [[ 5, "desc" ]],
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
{"fnRender": function ( oObj ) {
var imgpath;

if(oObj.aData[2]=="1")
{
imgpath="/images/zhu_index_qian_gongying_but.gif";
}
if(oObj.aData[2]=="2")
{
imgpath="/images/zhu_index_qian_qiugou_butto.gif";
}
if(oObj.aData[2]=="3")
{
imgpath="/images/zhu_index_qian_hezuo_button.gif";
}
var temp="";
return temp;
}},
null,
null,
null,
{ "fnRender": function ( oObj ) {

var tmp="";
return tmp;
},"bSortable": false},

{ "fnRender": function ( oObj ) {

var tmp="";
return tmp;
} ,"bSortable": false }
],
"sAjaxSource": "/ajax/ajaxget.aspx?action=getbizlist&state=0"
} );

Replies

  • jiweijiwei Posts: 4Questions: 0Answers: 0
    by the way ,the code by ff is ok,but by ie etc. like above
  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Hi jiwei,

    I think the problem can be solved by using POST to obtain your data rather than GET. Have a look at this example: http://datatables.net/examples/server_side/post.html

    Regards,
    Allan
This discussion has been closed.