Server side paging problem in IE

Server side paging problem in IE

siallochsialloch Posts: 3Questions: 0Answers: 0
edited March 2013 in General
Hi!

when using IE9 in compatibility mode, I see for example somthing like "Showing pages 1 to 15" on initial load. When clicking to the next page it displays something like "Showing pages 015 to ...". Datatables is used in server side mode here. So it seems to prepend "0" and/or does other funny things.

I found a workaround:

[code]
"fnPreDrawCallback" : function(oSettings) {
var self = this;
/*
* IE 7 pagination hack for datatables
*/
if ($.browser.msie && parseInt($.browser.version, 10) <= 7) {
var oSettings = this.fnSettings();
var newIDisplayStart = oSettings._iDisplayStart;
oSettings._iDisplayStart = parseInt(oSettings._iDisplayStart, 10);
}
}
[/code]

Has anybody seen this?

Thanks,
Alexander

Replies

  • siallochsialloch Posts: 3Questions: 0Answers: 0
    BTW: I think JSON server data is ok. It's using numeric format (no quotes around IDisplayStart etc). Other browsers work fine, even IE9 works fine in IE9 mode.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Please link to a test case.

    However, at a guess, I'd say your iDisplayRecords etc parameters in the return are strings rather than integers.

    Allan
  • siallochsialloch Posts: 3Questions: 0Answers: 0
    Thanks Allan, JSON data from server was fine.
    I am also using a cookie to restore the last iDisplayLength. The cookie get function did not convert to number.
    Thanks again! Just an idea... maybe you could convert to integer and create error message if that fails?

    Alexander
This discussion has been closed.