ie issue dataTable ajax
ie issue dataTable ajax
lusiton
Posts: 4Questions: 0Answers: 0
Hello, my name is Gil. I'm using datatable plugin on one of the sites my company builds for a client. I run into a raise condition problem with ie 7-8. Here is the page that showcases the issue: http://aim.libertyconcepts.com/Legislative-Action-Center. On FF, Chrome page will load normally but ie gives a warning about "Unexpected number of TD elements". There is an ajax function "getXmlSenate()" in init.js that reads XML and then creates table dynamically and appends a row using fnOpen function. I would appreciate you help and assistance in solving this issue.
This discussion has been closed.
Replies
$j('#example').html('' + ths + '' + tbl);
But the #example element isn't in the HTML or the Javascript that I can see. In Firefox I get an error about 'oTableSen is undefined'.
Just after this line:
$j('#example').html('' + ths + '' + tbl);
could you include:
console.log( $j('#example') );
console.log( '' + ths + '' + tbl );
Will hopefully help to see what is going on.
Regards,
Allan
'' into javascript so it will append the whole table at once to a div and still no luck. As you asked, I added console.log( $j('#example') );
console.log( '' + ths + '' + tbl );.
Allan
Currently I use this loop
[code]
for(i=0; i
The problem you are facing now is that your tbRow will be generated by querying the DOM, which has only the rows on the current page in it. The way DataTables works is that it will remove and insert rows from the DOM as required. To get all TR nodes, you can use the fnGetNodes ( http://datatables.net/api#fnGetNodes ) API function. Example use: http://datatables.net/examples/advanced_init/events_post_init.html
Allan