TableTools not working in IE7, no copy or export to excel
TableTools not working in IE7, no copy or export to excel
jkrobbins
Posts: 32Questions: 3Answers: 0
I've spent hours researching this, and although I've found where others have encountered the same problem, I've yet to find a solution. This problem does not occur in Firefox of course. Think how easy our lives would be if we as web developers didn't have to support IE....anyway.
Using DataTables-1.8.2 I get "Unknown runtime error" on line 135 which is:
[code]this.div.innerHTML = this.getHTML( box.width, box.height );[/code]
Other have suggested changing this line to this:
[code]$(this.div).html(this.getHTML(box.width, box.height));[/code]
..and that gets rid of the error but now the Copy button copies 0 rows to the clipboard, and the Excel button does nothing.
I'm not a Javascript guru and I've run out of ideas on how to fix this. Has anyone found a solution to this?
Using DataTables-1.8.2 I get "Unknown runtime error" on line 135 which is:
[code]this.div.innerHTML = this.getHTML( box.width, box.height );[/code]
Other have suggested changing this line to this:
[code]$(this.div).html(this.getHTML(box.width, box.height));[/code]
..and that gets rid of the error but now the Copy button copies 0 rows to the clipboard, and the Excel button does nothing.
I'm not a Javascript guru and I've run out of ideas on how to fix this. Has anyone found a solution to this?
This discussion has been closed.
Replies
[code]
function __flash__removeCallback(instance, name) {
instance[name] = null;
}
[/code]
Maybe this provides a clue?
Anybody?
The Copy & Excel buttons on my intranet webpage work fine in FF but not in IE.
Copy and Excel buttons on internet pages work in both FF and IE.
Is this a clue to the solution? Maybe a security setting in IE?
So if for those of you who will eventually run into this error, check your DOM structure. I created a copy of the failing page and then started stripping out sections of it until the error disappeared. Validate your page and fix any errors reported, but even if there are no errors, don't count on it being correct enough for ZeroClipboard to work.
Thanks very much. That lead me to my answer. I was nowhere close to figuring this out myself.
My problem was that my tables were nested in paragraphs. My pages are dynamically generated with Python & a module called HTMLtags. So the tags are automatically opened and closed properly.
This problem happens even with a validated DOM structure.
I had nested each table in a paragraph before to get acceptable spacing and alignment when I was doing HTML-only tables. Adding TT to my tables to get those buttons worked with FF but not IE. So, based on your post, I removed the paragraph nesting and presto. It now works on IE too.
Now all of those managers & bean-counters in the company can figure out how to get the Excel versions of my tables by themselves.
Thanks for posting your solution jkrobbins, it'd have taken me quite a while to find that as well! Generally speaking I've assuming for DataTables and all its plug-ins that the page will be valid HTML, and if it isn't then the browser will figure it out - this one sounds like a little bit of a nightmare one, though.
Regards,
Allan
Please check my Comment with IE Crash details at:
http://datatables.net/forums/discussion/comment/32047#Comment_32047
Also - you've posted the same thing three times - please only post a message once!
Thanks,
Allan