Thomas said:
"Mu" is the correct answer here. It is unnecessary (and unwise) to "add and
remove a large number of style elements" (client-side, programmatically);
not only with regard to your problem.
Feel free to un-ask the question yourself, but I personally still find
it an interesting idea to research.
ISTM you can lose the wrapper-DIV, see <
http://PointedEars.de/es-matrix>.
[ ... ]
That's one of the places I looked right away. I seem to remember that
you until recently had a button to toggle whether the table scrolled
or the body did.
You remember correctly.
No, given the same user agent it should still be there. However, in
contrast to previous revisions it remains hidden (display: none) when
and while activating it would not have an effect.
I was hoping that this button simply altered class names to switch which
styles applied.
It does add/remove/modify the `class' attribute of the TBODY element withID
`scroller'. See printScrollButton() in table.js for details.
If that worked, I assumed I could simply put one in my print-only
stylesheet and the other one on screen media. But I don't see that button
any more. I didn't chase it down further.
Either you did not use a user agent that supports sizeable TBODYs (which
includes Firefox/Iceweasel 3.6.3) or something is wrong with my feature-
testing that.
For me, in FF3.6.3, the TBODY is scrolling properly, and if I call
scroller.toggleScroll(true);
from the console it toggles as expected, but the button is not
visible. In other recent browsers I've tested the TBODY does not
scroll. And if I try making that call from IE8's console it returns
true, but also reports some error and does not change the scroll
behavior.
[Google's Living Stories] An example of this is at
Perhaps I am looking into this later, but I really do not expect too muchof
client-side Google applications at this point with regard to code quality
and accessibility.
Maybe not, but it was the effect I was interested in and not the
implementation. I can't see any likely accessibility problems with
it, but it is Google, so who knows?
I'll ask two good questions by contrast to yours:
What if the window is too small?
I don't resize the table below a certain size.
What if client-side DOM scripting is unavailable or insufficiently
supported?
Then the size of the table will not be adjusted. It will still be
visible. But that's simply out of habit. The system I'm taking over
gets all it's data through AJAX calls and displays it through DOM
manipulation. The page will not function at all with JavaScript
disabled. I disagree with this design, and will argue for change, but
that's pretty low down my list of things that need to be changed.
You don't need scripting for that, then.
Maybe not, but I think anything that would do this with straight CSS
would involve a significant change in page markup. It might be
doable, but it doesn't seem straightforward.
All this might be a case, though, of my knowing that nothing will work
without client scripting enabled and hence viewing such script as an
all-purpose hammer. I'll think about it some more.
Perhaps not. I'm trying other techniques, [...]
Like the straightforward one, CSS?
Yes, if I can do so without entirely reworking the pages.
ISTM CSS can readily provide this.
That's easy to do if there is no fixed-size header. I'm not so sure
how to do it as it stands. But that's off-topic in cljs.
In any case, thank you very much for the advice.