Solved

Html table in Perl

Posted on 2007-11-14
2
459 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Non-Resizable Pharagraph 2 19
Send email using HTML and PHP in separate file 5 41
Text color and background in a text box. 2 26
Ajax on ASP 2 43
Find out what you should include to make the best professional email signature for your organization.
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 position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

730 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