Re: "Freeze Panes" in table to make body scrollable
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 Sep 2005 22:27:01 +0100
Brett Merkey wrote:
> "Matt Kruse" <newsgroups@xxxxxxxxxxxxx> wrote
>> This is a common requirement - "freeze panes" in a table,
>> so that some header rows and some columns on the left are
>> frozen while the body content scrolls. ... .
<snip>
> Why use script at all? Links from here to variations on
> CSS theme:
>
>
http://web.tampabay.rr.com/bmerkey/examples/nonscroll-table-header.html
They don't actually work that well. If they did I would say use CSS, but
the header is not fixed in Opera 7.5, Mozilla puts up a horizontal
scroll bar and when you scroll it the header cells don't line up with
the horizontally scrolled body cells. The CSS makes an invalid
assumption about the dimensions of scroll bars (that they remain the
system defaults even though they are user configurable) and the table
cannot exceed the available horizontal space and be scrolled
horizontally to expose more headers and data cells. And above all you
cannot arrange that a single column is fixed next to a horizontally
scrolling body at all with CSS, let alone fix the top row and the
leftmost column.
As my script demonstrates that all of these things can be done, can be
done on many dynamic visual browsers, and can cleanly degrade into
entirely usable HTML in environments that do not support the script, the
reason for scripting it might be that it works where CSS alone cannot.
<snip>
> I agree on the cited Cornford script. Impressive but not
> for the normal dev environment.
What is required in a development environment is code that does what it
was specified to do with the simplest possible interface. As the entire
public interface for my script is a single function you cannot get much
simpler. All anyone wanting to use the script has to do is write (or
script generate) an HTML table that conforms with the (limited)
restrictions in the documentation, style it, provide it with a unique ID
and pass the id as an argument to a function call, and it was designed
for, and lends itself to, having that process automated in server side
scripts.
When writing code to be used by others (and particularly server-side
programmers who don't know javascript, and don't want to) it is the
external view of an object that is important not the code inside it.
> In addition, clients usually like a good print version
> of a data table and all scripts usually fail that test
> miserably.
That is mostly just a failure to understand an !Important aspect of CSS
in print style sheets.
Richard.
.
- Follow-Ups:
- Re: "Freeze Panes" in table to make body scrollable
- From: Matt Kruse
- Re: "Freeze Panes" in table to make body scrollable
- References:
- "Freeze Panes" in table to make body scrollable
- From: Matt Kruse
- Re: "Freeze Panes" in table to make body scrollable
- From: Brett Merkey
- "Freeze Panes" in table to make body scrollable
- Prev by Date: Java Script help
- Next by Date: Re: Java Script help
- Previous by thread: Re: "Freeze Panes" in table to make body scrollable
- Next by thread: Re: "Freeze Panes" in table to make body scrollable
- Index(es):
Relevant Pages
|