ColVis error: NOT_FOUND_ERR: DOM Exception 8

ColVis error: NOT_FOUND_ERR: DOM Exception 8

alanitechalanitech Posts: 1Questions: 0Answers: 0
edited May 2011 in General
Hi!
I'm not much of a javascript guy so pretty useless at debugging.

I have datatables running no problem. I just tried to add in the ColVis plug-in.
The "Show/hide columns" button shows up, and clicking on it gives me the columns list with the checkboxes.
When I switch one of the checkboxes, though, I get an error from dataTables.js line 2043 ("NOT_FOUND_ERR: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exists.")

DataTables sorting and filtering functionality works fine.

Any suggestions?

Replies

  • therealklannitherealklanni Posts: 2Questions: 0Answers: 0
    I have a similar problem in both 1.7.6 and 1.8b3

    I'm not using the colvis plugin, but I am trying to show/hide columns using fnSetColumnVis.

    I seem to be able to run the function in one of my functions, but not in another. I have a function that loads a cookie and set column visibility based on user prefs from the cookie, which seems to work fine, but then if I try to show/hide any column in another function I get the same error you describe.

    Does anyone have any insight into this?

    For reference, in 1.8b3, the error occurs at line 2044
  • therealklannitherealklanni Posts: 2Questions: 0Answers: 0
    And I just figured it out. I am using jQuery UI with dataTables, and my config and table are in separate tabs, so when the config is changed the table is hidden (not in DOM) by jQuery UI, so I worked around this by just setting the config option in the config tab and instead of trying to fire fnSetColumnVis right there, I put it into the jQuery UI "select" event for the tab, so when the user switches back to the tab containing the table that's when the fnSetColumnVis is now being fired. No more DOM Exception 8!
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Ah! Good find - nice debugging, and thanks for letting me know what the issue was :-)

    Allan
This discussion has been closed.