R
Rich Morey
Hi,
I have a table where I am altering the layout via javascript to create
colspans. I want to then delete the "Extra" cells created by the
colspans.
I have named the cells "r1c1", "r1c2", "r2c1", etc..
document.getElementById('r2c2').colSpan="4"
cellRows = document.getElementById('tableChart').rows(1);
cellRows.deleteCell(2);
cellRows.deleteCell(2);
cellRows.deleteCell(2);
document.getElementById('r2c7').colSpan="4"
cellRows = document.getElementById('tableChart').rows(1);
cellRows.deleteCell(4);
cellRows.deleteCell(4);
cellRows.deleteCell(4);
This code works because when I'm working on r2c7, I know that I've
already deleted three cells above and so the next cells to delete are
column index of 4.. but what I'd like to be able to do is delete the
cells by name, in this case
'r2c8', 'r2c9', and 'r2c10'
Is there anyway to do that? I tried just
document.getElementById('r2c8').deleteCell()
but that gave me a javascript error..
Thanks,
Rich
I have a table where I am altering the layout via javascript to create
colspans. I want to then delete the "Extra" cells created by the
colspans.
I have named the cells "r1c1", "r1c2", "r2c1", etc..
document.getElementById('r2c2').colSpan="4"
cellRows = document.getElementById('tableChart').rows(1);
cellRows.deleteCell(2);
cellRows.deleteCell(2);
cellRows.deleteCell(2);
document.getElementById('r2c7').colSpan="4"
cellRows = document.getElementById('tableChart').rows(1);
cellRows.deleteCell(4);
cellRows.deleteCell(4);
cellRows.deleteCell(4);
This code works because when I'm working on r2c7, I know that I've
already deleted three cells above and so the next cells to delete are
column index of 4.. but what I'd like to be able to do is delete the
cells by name, in this case
'r2c8', 'r2c9', and 'r2c10'
Is there anyway to do that? I tried just
document.getElementById('r2c8').deleteCell()
but that gave me a javascript error..
Thanks,
Rich