Problem in IE with "Dynamically add a new row"

Problem in IE with "Dynamically add a new row"

miki117miki117 Posts: 1Questions: 0Answers: 0
edited November 2009 in General
Hello all,
Sorry for my English ;)

I have a problem in IE8 (in Firefox and Chrome all works well).
I have two datatable in the same page, one with checkboxes (loaded server-side) and the other without (empty).
When I click on a checkbox, on the other datatable has to appear a row, but in IE this doesn’t happen. In fact I have to click somewhere in the page to add the row.

This is the code.

[code]
oTable2 = $('#selected-list').dataTable({
'iDisplayLength': 10,
"sPaginationType": "full_numbers",
"sDom": 'rtpi<"clear">',
"bSort": false,
"oLanguage": {
"sZeroRecords": ""
}
});

oTable = $('#group-list').dataTable({
'iDisplayLength': 10,
"sPaginationType": "full_numbers",
"sDom": 'frtpi<"clear">',
"bSort": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/LPComparison-war/servlet/ListServlet?actionTarget=GROUP_LIST_FOR_COMPARISON",
"fnDrawCallback": function () {
var aTrs = oTable.fnGetNodes().length;
for(j=0; j

Replies

  • allanallan Posts: 61,831Questions: 1Answers: 10,132 Site admin
    Hi miki117,

    Have you had any luck in solving this? One this that strikes me as looking odd is "var aTrs = oTable.fnGetNodes().length;" (and similar in the two other functions) - you are assigning the length of the array to aTrs, not the array itself - is this what you intended, and it's just a little confusion with the variable prefix ('a' stands for 'array). I suspect its just that, in which case the code could be optimised quite a lot, since fnGetNodes() can be quite expensive.

    The other thing is that I don't see where checklist() is being called from. This is what is adding the new row is it not, but I don't see an event handler or anything which calls it. Also, do you get any Javascript errors in IE?

    Regards,
    Allan
This discussion has been closed.