13

I'm getting this error:

Uncaught TypeError: Cannot read property 'fnInit' of undefined

jquery.dataTables.js:2872

DataTable.ext.oPagination[ oSettings.sPaginationType ].fnInit( oSettings, nPaginate, 
                function( oSettings ) {
                    _fnCalculateEnd( oSettings );
                    _fnDraw( oSettings );
                }
            );

Table is placed properly, I think, that problem is not in HTML.

3
  • a fiddle would be helpful Commented Jun 16, 2014 at 13:01
  • You JS library that 'fnInit' call suppose to invoke seems to be not included in your code Commented Jun 16, 2014 at 13:08
  • I had the same cause as @rrsuh - I had "bootstrap" instead of a valid numbers in my datatable setup: "sPaginationType": "bootstrap", - changing it to "sPaginationType": "full_numbers", solved it for me. Commented Aug 4, 2021 at 13:10

1 Answer 1

36

CAUSE

It seems that the problem is that you used not supported value for sPaginationType or pagingType option.

SOLUTION

DataTables 1.10

Option pagingType supports the following values by default:

  • numbers - Page number buttons only (1.10.8+)
  • simple - 'Previous' and 'Next' buttons only
  • simple_numbers - 'Previous' and 'Next' buttons, plus page numbers
  • full - 'First', 'Previous', 'Next' and 'Last' buttons
  • full_numbers - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers

DataTables 1.9

Option sPaginationType supports the following values by default:

  • two_button- 'Previous' and 'Next'
  • full_numbers - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers
Sign up to request clarification or add additional context in comments.

2 Comments

Hello @Gyrocode.com I'm using 1.10 datatable, is input not supported by pagingType ? I'm trying to display a jump to page input field.
@natsumiyu, input is extra option that is not supported by default. You will need to include extra JS file to add support for input pagination type. Please see input plug-in for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.