Welcome Guest, Not a member yet? Register   Sign In
Not showing table properly
#8

[eluser]weboap[/eluser]
check myjs.js
Code:
$(window).load(function() {
    $('#datatable').dataTable();    
}
// you got a syntax error here


try instead

Code:
$(document).ready( function () {


  //check if the datatable table exist.

    if ($("#datatable").length > 0){
    
     //apply dataTable to #datatable table and save its object in dataTable variable
if( typeof dataTable == 'undefined' ){
     dataTable = $( '#datatable' ).dataTable();
}else{
// this two lines to help redraw the table if you add or remove lines
  dataTable.fnClearTable( 0 );
  dataTable.fnDraw();
  }

    }

  
  
  
  
  
});



Messages In This Thread
Not showing table properly - by El Forum - 05-11-2012, 01:13 PM
Not showing table properly - by El Forum - 05-11-2012, 03:52 PM
Not showing table properly - by El Forum - 05-11-2012, 04:55 PM
Not showing table properly - by El Forum - 05-11-2012, 05:16 PM
Not showing table properly - by El Forum - 05-11-2012, 05:58 PM
Not showing table properly - by El Forum - 05-12-2012, 03:30 AM
Not showing table properly - by El Forum - 05-12-2012, 07:52 AM
Not showing table properly - by El Forum - 05-12-2012, 11:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB