Re: "Freeze Panes" in table to make body scrollable



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.


.



Relevant Pages

  • Re: Odd border round image link
    ... >> Stephen's script works fine but POTW's is better (I put it at the bottom ... > Just be satisfied with the dots vanishing as soon as they've done their job. ... a framed page the focus is the frameset, I'd like to make it the main ... content page so users get the same "click to the page and scroll down" ...
    (uk.net.web.authoring)
  • Re: Difficulties in deriving a truly universal GUI Scripting Language
    ... interpretation, but yes, it *is* possible, although unlikely, the caret ... Even the rich edit control, in one of the most glaring API oversights I've ... In that case the script author would have to have the script do the same ... of spontaneously scroll underneath you. ...
    (microsoft.public.vc.mfc)
  • Re: Difficulties in deriving a truly universal GUI Scripting Language
    ... interpretation, but yes, it *is* possible, although unlikely, the caret ... Even the rich edit control, in one of the most glaring API oversights I've ... In that case the script author would have to have the script do the same thing ... of spontaneously scroll underneath you. ...
    (microsoft.public.vc.mfc)
  • Re: Static menu without frames
    ... This is the problem - I need the page to scroll but I need the ... Javascript equivalents high and low but all I can find are examples of ... script that will do what I need? ... It simple CSS positioning. ...
    (alt.html)
  • Re: Testing Original Script
    ... advertise plus scroll changes and close button in the controls. ... This is the Original Script that Richard posted a couple of years ago, ... controls in the Popup to control midi volume and scrolling. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress.stationery)