blink has asked for the wisdom of the Perl Monks concerning the following question:
# print include files for SSI sub printIncludes { for my $incHandle ( keys %anchors ) { for my $status ( keys %{ $anchors{$incHandle} } ) { print $incHandle "@{ $anchors{$incHandle}{$status} }\n"; } } }
which creates a table like this. I'm stuck trying to modify this sub to print one column for each distinct color(status) found in %anchors.
%anchors gets populated like this:
# Hash of colors my %colors = ( active => "#005154", failed => "#ff0000", queued => "#622188", partial => "#ffb90f", success => "#00ff00" ); # Hash of titles my %titles = ( active => "Active Jobs", failed => "Failed Jobs", queued => "Queued Jobs", partial => "Partially Successful Jobs", success => "Successful Jobs" ); $incString = "<tr><td align=\"center\"><a href=\"\#$class\.$titles{$status}\"><font + color=\"$colors{$status}\">$class</a></font></td></tr>"; push ( @{ $anchors{$incHandle}{$status} }, $incString );
As per usual, any assistance is greatly appreciated. ~ ~ ~
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamic HTML table Creation
by BrowserUk (Patriarch) on Aug 15, 2002 at 04:12 UTC | |
|
Re: Dynamic HTML table Creation
by DamnDirtyApe (Curate) on Aug 15, 2002 at 03:44 UTC | |
by blink (Scribe) on Aug 16, 2002 at 01:48 UTC |