Not able to use pagination
Not able to use pagination
abhi12363
Posts: 6Questions: 0Answers: 0
Hi All,
Please Help am in serious trouble , I am using datatables first time and m stuck on pagination stuff when ever i enable pagination my page throws error , After some R&D i found that there are some variables used in pagination were undefined in jquery.datatable.min.js .. Please HELP
dataTables setting Code
@import "CSS/pro_dropdown_2.css";
@import "CSS/dash_board.css";
function tData(){
var data={"iTotalDisplayRecords":50,"iTotalRecords":50,"aoColumns":[{"sTitle":"Company name","sWidth":"25%"},{"sTitle":"Address","sWidth":"25%","sClass":"center"},{"sTitle":"Town","sWidth":"25%"}],"aaData":[["Emkay Entertainments","Nobel House, Regent Centre","Lothian"],["The Empire","Milton Keynes Leisure Plaza","Buckinghamshire"],["Asadul Ltd","Hophouse","Essex"],["Gargamel ltd","",""],["Ashley Mark Publishing Company","1-2 Vance Court","Tyne \u0026 Wear"],["MuchMoreMusic Studios","Unit 29","London"],["Victoria Music Ltd","Unit 215","London"],["Abacus Agent","Regent Street","London"],["Atomic","133 Longacre","London"],["Pyramid Posters","The Works","Leicester"],["Kingston Smith Financial Services Ltd","105 St Peter\u0027s Street","Herts"],["Garrett Axford PR","Harbour House","West Sussex"],["Derek Boulton Management","76 Carlisle Mansions","London"]],"sEcho":"1"};
return (data);
}
$(document).ready( function () {
var table=tData() ;
$('#roleS').dataTable( {
"sPaginationType": "full_numbers",
"bPaginate": true,
"bProcessing": true,
"bJQueryUI": true,
"bAutoWidth": false,
"bLengthChange": true,
"aaData": table.aaData,
"aoColumns":table.aoColumns
} );
});
HTML TABLE
ERROR found in fire bug:
TypeError: nPrev is undefined
nPrev.id =oSettings.sTableId+'_previous';
Hoaping for Help.
Thanks
Please Help am in serious trouble , I am using datatables first time and m stuck on pagination stuff when ever i enable pagination my page throws error , After some R&D i found that there are some variables used in pagination were undefined in jquery.datatable.min.js .. Please HELP
dataTables setting Code
@import "CSS/pro_dropdown_2.css";
@import "CSS/dash_board.css";
function tData(){
var data={"iTotalDisplayRecords":50,"iTotalRecords":50,"aoColumns":[{"sTitle":"Company name","sWidth":"25%"},{"sTitle":"Address","sWidth":"25%","sClass":"center"},{"sTitle":"Town","sWidth":"25%"}],"aaData":[["Emkay Entertainments","Nobel House, Regent Centre","Lothian"],["The Empire","Milton Keynes Leisure Plaza","Buckinghamshire"],["Asadul Ltd","Hophouse","Essex"],["Gargamel ltd","",""],["Ashley Mark Publishing Company","1-2 Vance Court","Tyne \u0026 Wear"],["MuchMoreMusic Studios","Unit 29","London"],["Victoria Music Ltd","Unit 215","London"],["Abacus Agent","Regent Street","London"],["Atomic","133 Longacre","London"],["Pyramid Posters","The Works","Leicester"],["Kingston Smith Financial Services Ltd","105 St Peter\u0027s Street","Herts"],["Garrett Axford PR","Harbour House","West Sussex"],["Derek Boulton Management","76 Carlisle Mansions","London"]],"sEcho":"1"};
return (data);
}
$(document).ready( function () {
var table=tData() ;
$('#roleS').dataTable( {
"sPaginationType": "full_numbers",
"bPaginate": true,
"bProcessing": true,
"bJQueryUI": true,
"bAutoWidth": false,
"bLengthChange": true,
"aaData": table.aaData,
"aoColumns":table.aoColumns
} );
});
HTML TABLE
ERROR found in fire bug:
TypeError: nPrev is undefined
nPrev.id =oSettings.sTableId+'_previous';
Hoaping for Help.
Thanks
This discussion has been closed.
Replies
Allan
Thank u so much for ur reply here is dataTable debugger link Please help to resolve this issue
http://debug.datatables.net/ohimay
Thanks for Ur Help.
It rather looks to me that something must be going wrong during the initialisation - a javascript error most likely. If you look at the Javascript console in your browser, do you see any errors reported?
Allan
file name : jquery.dataTables.js
Line No : 11675
I found var els[1],els [2],els [3] is undefine on my consol because of this
file name : jquery.dataTables.js
Line No : 11691
Below mentioned Variables are not able to initialise and showing undefined .
nPrev.id =oSettings.sTableId+'_previous';
nNext.id =oSettings.sTableId+'_next';
nLast.id =oSettings.sTableId+'_last';
Thanks
Thanks for ur quick rply If u want u can take a look on screen sort of consol from below mentioned link.
https://dl.dropboxusercontent.com/u/68166830/errorConsol.png
Allan