Solved

Html table in Perl

Posted on 2007-11-14
2
462 Views
Last Modified: 2012-06-27
I retrieve a resultset using Perl DBI. And print it in a HTML table. But whenever there are no value for particular column then there is no cell border. I want entire table whether the column has value or not.
0
Comment
Question by:saibsk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:BioI
ID: 20281078
check whether the value exists in your table,
and if the value is not defined, print " "
if (defined($columnvalue)) {
   print "<td>$columnvalue</td>";
}else{
   print "<td>&nbsp;</td>";
}
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 20281409
Change:
    print qq[<td style="">] .escapeHTML($cell). qq[</td>];
To:
    print qq[<td style="">] .(escapeHTML($cell) or "&nbsp;"). qq[</td>];
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Six Sigma Control Plans

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question