Server side paging problem in IE
Server side paging problem in IE
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
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
This discussion has been closed.
Replies
However, at a guess, I'd say your iDisplayRecords etc parameters in the return are strings rather than integers.
Allan
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