IE7 still able to support server side?

IE7 still able to support server side?

blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
edited August 2013 in General
I have rewrite the script from MSSQL to support ORACLE. My datatable.php output is
<?
if ($_GET[type]=="ISR"){
?>
{"sEcho":0,
"iTotalRecords":"1",
"iTotalDisplayRecords":"1",
"aaData":[
["-",
"1",
"BEACH","
BEACH2
]]}
<?
}
?>

in javascript I have this
$('#liveTable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "datatable.php?type=ISR"
});

The table able to display well in IE8, firefox and chrome. But it does not display the table result in IE7.

Replies

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    It should do! What is sEcho 0 isn't valid for server-side processing and iTotalRecords and iTotalDisplayRecords should be integers, but it should work in IE7.

    Allan
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    edited August 2013
    ok I admend

    <?
    if ($_GET[type]=="ISR"){
    ?>
    {
    "iTotalRecords":1,
    "iTotalDisplayRecords":1,
    "aaData":[
    ["-",
    "1",
    "BEACH","
    BEACH2
    ]]}
    <?
    }
    ?>

    Now IE7 still doesn't display. show only processing...
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    You still need sEcho - http://datatables.net/usage/server-side . Set it to 1 - but obviously that's only going to work for the first draw.

    Also the content of the array is not valid JSON.

    Allan
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    How shall the JSON array look like? I have compare with other working example. Is that the reason why it works on IE8 and not on IE7?
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    Allan,
    I tried and found the problem. I have 30 column to display. but IE7 allow only until 24 columns. 25 onwards the browser will not show any data. Is there a limitation?
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    Sounds like you are using HTTP GET. Try HTTP POST using sServerMethod .

    Allan
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    Ok this is what I am having now, added sServerMethod
    Good news is yes, is showing in both IE7 and IE8

    $('#liveTable').dataTable({
    "bProcessing": true,
    "bServerSide": true,
    "sPaginationType": "full_numbers",
    "sAjaxSource": "datatable.php?type=ISR",
    "sServerMethod": "POST"
    });

    but now the data doesn't have any Pagination.
    What shall I do next?
    :(
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    Well, you need to implement server-side processing as described in the documentation if you want to use server-side processing. Obviously a static array is not going to be sufficient.

    Do you really need server-sid processing? Are you using tens of thousands of rows?

    Allan
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    Yes Allan, 11554 rows with 52columns. Sorry, I am very new to this. Some of the qns is quite newbie. I already follow what is from the document.
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    edited August 2013
    FYI the array is not static, I have rewrite how the data generated using php. What I provide now here is just example.
    Now I realise that when I added "sServerMethod": "POST". the $_GET['iDisplayStart'] and $_GET['iDisplayLength'] is not able to get any value from the pagination option. how can I modify to the value?
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    Well if you are POSTing data, you'd use the POST variable in PHP. $_POST .
  • blurrblurrblurrblurr Posts: 17Questions: 0Answers: 0
    Ya problem solved. I miss one of the $_post my bad. Everything works one now
This discussion has been closed.