Freezing Headers ... Possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asearle
    New Member
    • Sep 2006
    • 39

    Freezing Headers ... Possible?

    Hi everyone,

    I currently display XML data with XSLT which works fine (including some dynamic filtering with JavaScript).

    However, often the data which is returned is quite lengthy and, as the user scrolls down to look at the data, the header disappears off the top of the viewable portion of the browser. This is quite irritating as the header contains summing and title information which should remain in view.

    So my question here is whether there is an easy way to freeze the header and make the data scrollable?

    Of course the first thought that I had was to use 'frames' but I believe that this would either be impossible with XSLT or would make the coding significantly more complex. Am I right or is there an easy way to do this?

    Any tips or links to HOWTOs would be a big help.

    Many thanks,
    Alan Searle
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    It sounds like you want CSS, with a header div that remains in fixed or absolute position, and a scrolling div in the middle.

    eg http://www.cssplay.co.uk/layouts/basics2.html
    Let us know if that works for you.

    Comment

    • asearle
      New Member
      • Sep 2006
      • 39

      #3
      Many thanks for the link showing how to freeze the headers ...

      eg http://www.cssplay.co.uk/layouts/basics2.html

      ... and yes, this works fine (even incorported into an XSL file). I'm very pleased and many thanks for your help.

      However, I am curious about one thing:

      As it is, I will use the frozen head to hold my column headers and totals in place while the data is scrollable. This will mean that the user will see both the detail numbers and the totals at once which was not the case before.

      Yes, that works fine but I am now having to fiddle around with declarations of absolute position in order to keep the headers above their respective columns. This works but is a bit tedious and could cause problems if one user needs to access the system from a computer with a smaller screen (i.e. the columns will not re-sized).

      What would be even better than the frozen headers would be a scrollable grid or table where I can declare a table and then the system automatically makes that table scrollable (like a list box) while keeping the headers static.

      Am I asking too much? Does such a thing exist?

      Any tips would be gratefully received.

      Regards and many thanks,
      Alan Searle

      Comment

      • asearle
        New Member
        • Sep 2006
        • 39

        #4
        I've been google on 'scrollable grid' and there seems to be a lot of discussion (noise) out there on this topic.

        It seems that there are commercial solutions and a lot of ASP chat about this issue. However, I am working with XSLT & JavaScript and don't really want to get involved in testing 'add-ons' or writing lots of code.

        If there is nothing that is more or less (HTML) standard, then I will probably stick with the frozen-header solution. That works well and looks good and so all I need to do is to fix the widths of the columns.

        Many thanks,
        Alan Searle

        Comment

        Working...