Have you looked at HTML::Pager? Not exactly what you want but probably what
I'd use in those circumstances, unless there was a reason not to...
-Dave
----- Original Message -----
From: "Martijn van den Burg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 10:11 AM
Subject: Re: [htmltmpl] HOWTO repeat table headers?
> Hi,
>
> On Tuesday 04 December 2001 14:13, Dan Collis Puro wrote:
> > Here's a way I do it:
> >
> >
> > my $count;
> > my %header_row= {your hash for your header row};
> > my @tmpl_loop
> > while (my $info=$handle->fetchrow_hashref){
> > $count ++;
> > my %hash;
> > $hash{VAR1}=$info->{var1};
> > # On the first loop through this will push in the header row, and
> > # then on each 20th loop it will push it in.
> > # Gotta love modulus! The next line is the clincher.
> > push @tmpl_loop \%header_row if(($count % 20) == 0);
> > push @tmpl_loop \%hash;
> > }
>
>
> That'll do it nicely except that I want my heading rows between <TH>s
(these
> have their own distinctive style) and in the way suggested by you they
will
> be printed betwen <TD>s, making them stand out less. But then, I didn't
> mention that ;)
>
> Of course I could start using <TD>s and <TH>s in the hashrefs to control
> formatting but that sort of defies the use of H::T and makes for very ugly
> code.
>
> Would this kind of thing stand any chance as an 'improvement request' for
> H::T?
>
> >
> > On 4 Dec 2001 at 9:55, Martijn van den Burg wrote:
> <snip>
> > >
> > > I'm using H::T to fill a long and wide table with data obtained from a
> > > MySQL database. Because the table is long and screen real estate is
> > > limited the header disappears below the top of the window when
> > > scrolling down. This requires the users to remember what categories
> > > there are in the table columns. Some consider this a nuisance andI
> > > agree.
> > >
> > > I would like to repeat the table heading every twenty rows, is there
> > > an elegant way to do this?
> > >
>
>
> Martijn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]