I'll explain...
The table I am getting is an inventory values table.
The first column is the name of the affected product group, and the next column is the figures of last year's december. All following tables are januari, februari and so on...
The table is too long to fit the screen, so I was asked if it was possible to scroll the table, but to let the first two columns visible. (so scroll only the month-columns).
When I build my table, I calculate how much columns I can draw on my screen without having to scroll(with the function window.screen.availWidth I can get the available width of my screen, and from there I calculate).
From there I hide all columns that 'fall out of the screen' with the method getElementsByName.
For example: if my calculations say that 6 columns can be displayed:
for (var i=7; i<13; i++)
{
cells = document.getElementsByName("Col" + i);
for (var j=0; j < cells.length; j++)
cells[j].style.display = 'none';
}
}
Done!
I just had to add two buttons (one Right, one Left) to scroll to the remaining columns
function Left()
{
cells = document.getElementsByName("Col1"

;
for (var j=0; j < cells.length; j++)
cells[j].style.display = 'none';
cells = document.getElementsByName("Col7"

;
for (var j=0; j < cells.length; j++)
cells[j].style.display = 'block';
}
Then I realised that, because my table was quite long, if I scrolled down my table, I couldn't see my scrolling buttons. So I wanted to put them in another frame so they could stay visible...
And there I am
Sigh... what an explanation!