Resizing Table Causes oFeatures is null or not an object

Resizing Table Causes oFeatures is null or not an object

SLDykeSLDyke Posts: 4Questions: 0Answers: 0
edited March 2013 in DataTables 1.9
I have an HTML table on my page created using JSTL. I use jQuery.load and div tags. The following is included:

[code]


$(document).ready(function(){

var oTableV5 = $('#rtQueueBody').dataTable({
"bPaginate": false,
"bSort": false,
"bFilter": false,
"sScrollY": "500px"

});

$(window).resize(function() {
oTableV5.fnAdjustColumnSizing();
});

});



[/code]

When the page is first loaded it appears and resizes fine, all the columns line up. However, if I reload the page I get the js error: oFeatures is null or not an Object Line 227. At this point the header on longer resizes with the body columns. If I reload the page again the columns will line up normally but if resized the header columns stay static.

Replies

  • SLDykeSLDyke Posts: 4Questions: 0Answers: 0
    Is there anyone that can help me with this issue.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Please link to a test case.

    Allan
  • SLDykeSLDyke Posts: 4Questions: 0Answers: 0
    Can you suggest how I would do that? The web application is running on our intranet and makes connection to remote data. My initial take on this is on page refresh or reload the datatable js looses the referance to the oFeatures somehow.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    This shows the code you posted earlier: http://live.datatables.net/ezazug/edit#javascript,html . It also shows no errors. So I need to be able to reproduce the issue you are seeing to stand a chance of being able to help - otherwise I'm just guessing :-)

    Allan
  • SLDykeSLDyke Posts: 4Questions: 0Answers: 0
    I think I fixed it by moving the js to external js file and making the var oTablesV5 global to that js file.
This discussion has been closed.