Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am using DBIx::XHTML_Table to generate table based on the query result. I want to add links to one column of the table. I am using the following code to generate table. And want to add link to 3 rd column of the table.
my $table = DBIx::XHTML_Table->new('DBI:Pg:dbname=misdb', 'pluser', '' +); $table->exec_query("$sql"); $table->modify(table => { width => '100%', cellspacing=> '2', cellpadding=>'5', }); $table->modify(th => { style => { color => '#FFFAF0', background => '#4682B4', 'text-align' => 'center', 'text-transform'=> 'uppercase', } },'head'); $table->modify(tr => { style => { background => ['#B0C4DE','#F0F8FF'], } }); $table->modify(td => { style => { 'text-align' => 'left', 'white-space' => 'nowrap', } }); $table->modify(td => { style => { 'text-align' => 'center', 'white-space' => 'nowrap', } },['Projects','Tasks','EstimatedDays','SpentDays']); $table->modify(th => { style => 'background: #FFF0F5' },'foot'); if (param('radio-report') eq 'Summary'){ $table->calc_totals(['Projects','Tasks','EstimatedDays','Spent +Days']); }else{ $table->calc_totals(['Tasks','EstimatedDays','SpentDays']); }
Thnx

Replies are listed 'Best First'.
Re: Need to add Link to col in a table.
by Anonymous Monk on Nov 20, 2006 at 12:12 UTC
    Try using map_cell.