Description
I'm using the latest version of jexcel v3. When using a jexcel spreadsheet within a table I get Uncaught TypeError: element.getAttribute is not a function at GetCellCoords when using pagination etc. See example below:
<table>
<tr>
<td>
<div id="spreadsheet"></div>
</td>
</tr>
</table>
<script>
jexcel(document.getElementById('spreadsheet'), {
csv:'/demo.csv',
csvHeaders:true,
search:true,
pagination:5,
paginationOptions:[10,25,50,100],
columns: [
{ type: 'text', width:120, readOnly:true },
{ type: 'text', width:100, readOnly:true },
{ type: 'text', width:100, readOnly:true },
{ type: 'text', width:100, readOnly:true },
{ type: 'text', width:100, readOnly:true },
]
});
</script>
When it's outside a table it works perfectly. Anyway I can resolve without having to take out of the table?
Activity
pphod commentedon Nov 5, 2019
Did you try the most recent version? I guess this has been fixed. If not can you create a jsfiddle to explain more about the problem?
alberto-ita commentedon Apr 9, 2020
Hi Paulhodel I'm using your jexcel v4.
First Thanks you for your work, I really appreciate.
I tested jexcel on the local server, and on a "normal" page everything works normally.
Then I put the page in a job I'm doing; the situation is this:
I have a Parent page that makes load() calls and loads the pages into a DIV (as you normally do).
$('#mybutton').click(function(){ $("#myDiv").load("my-jexcel-page.php"); });The page loads normally and jexcel works "almost" normally.
If I click in the column header or pagination buttons, I receive this error (on the console):
Uncaught TypeError: element.getAttribute is not a function
refered to line 6807 on jexcel.js
Please note that the jquery and the jexcel are on the parent page and the script work well if the page is not loaded by jquery.
Can you have some suggestions to solve ? Thanks
Alberto
alberto-ita commentedon Apr 9, 2020
Hello Paulhodel
for now i found a solution, little dirth, not your solution.
The problem maybe was caused by some conflict with jQuery;
at the line 6807 i changed the code
with
Thanks again, and if you have a clean solution, please write.
Regards.