in reply to (jeffa) Re: (OT) Use javascript? ahhh!!!
in thread (OT) Use javascript? ahhh!!!

Thanks, but that's not exactly what I meant. The question was about avoiding Javascript, if it's at-all possible.

About no tables, this sounds interesting but I don't know if I'll have the time to learn that.

Thanks anyway, guys...

  • Comment on Re: (jeffa) Re: (OT) Use javascript? ahhh!!!

Replies are listed 'Best First'.
Re: Re: (jeffa) Re: (OT) Use javascript? ahhh!!!
by diotalevi (Canon) on Jun 09, 2003 at 16:53 UTC

    That answer will help you solve the problem. Define your cell widths and the rest will follow. Use percentage widths and if you absolutely must alter your HTML based on screen size then you'll need to use JavaScript to fetch it.

(jeffa) 3Re: (OT) Use javascript? ahhh!!!
by jeffa (Bishop) on Jun 10, 2003 at 23:46 UTC
    A thought crossed my mind - would allowing the viewer to change the number of columns be a possibility? If so, you could use something like the following script:
    use strict; use warnings; use CGI qw(:standard); print header,start_html,start_form, p( 'How many columns? ', popup_menu(-name=>'cols',-values=>[1..16]), ), submit,end_form,hr, ; my $cols = param('cols') || 4; my @one_d = map sprintf('%02x',$_) x 3, reverse (0..255); my @two_d = map[ @one_d[$_..$_+$cols-1] ], range(0,$#one_d,$cols) ; print p("there are $cols columns:"), table( map {Tr( map {td{bgcolor=>"#$_"},$_} @$_ )} @two_d ), end_html, ; sub range {grep!(($_-$_[0])%($_[2]||1)),$_[0]..$_[1]}

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)