Table error:

Table error:

thempowerthempower Posts: 1Questions: 0Answers: 0
edited November 2013 in Plug-ins

I'm having a problem on my website when loading a datatable,
It gives this error:
[quote]Datatables warning (table id = 'usertable'): cannot reinitialise Datatable. To retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy[/quote]

The table is looking like this:

And in the code of my javascript it's looking like this:
[code] if($("#usertable").length > 0){
var opt = {
"sPaginationType": "full_numbers",
"sSearch": "Zoek: ",
"sInfo": "Rij _START_ tot rij _END_ van de _TOTAL_ rijen",
"sLengthMenu": "_MENU_ Rijen per pagina"
'sDom': "lfrtip",
'aoColumnDefs' : [
{ 'bSortable': false, 'aTargets': [0, 5] }
'oColVis': {
"buttonText": "Change columns "
'oTableTools' : {
"sSwfPath": "js/plugins/datatable/swf/copy_csv_xls_pdf.swf"
var oTable = $('#usertable').dataTable(opt);

$('.dataTables_filter input').attr("placeholder", "Zoek hier ...");
$(".dataTables_length select").wrap("").chosen({
disable_search_threshold: 9999999
$('input', oTable.fnGetNodes()).prop('checked',this.checked);
$.datepicker.setDefaults( {
dateFormat: "dd-mm-yy"
"sPlaceHolder" : "head:after",
'sRangeFormat': "{from}{to}",
'aoColumns': [
type: "text",
type: "number-range",
type: "date-range"
type: "number-range",
type: "number-range"
$("#usertable").css("width", '100%');

I want to have special filtering and the table tools.
And can someone tell me where I can change the words first, previous, last and next from the pagination because I have to translate it in dutch but can't find it.

Thank you in adventage!


  • allanallan Posts: 60,962Questions: 1Answers: 9,939 Site admin
    Sounds like you are initialising the table twice, as the error says. not sure why that would be without a link to the page though since the code about doesn't show what triggers it.

This discussion has been closed.