perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaare Rasmussen" <...@kakidata.dk>
Subject Header / Footer when empty list
Date Wed, 18 Dec 2002 16:28:08 GMT
Hi 

How can I have a header and footer for a list of data, even if the list is 
empty? 

Right now I have something similar to this:
<TABLE WIDTH=100%>
[$if $row == 0$]
<TR>
<TH WIDTH=80 CLASS=Title ALIGN=center>[=Select=]</TH>
<TH WIDTH=20% CLASS=Title ALIGN=center>[=Articlenr=]</TH>
...
</TR>
[$endif$]
[$if $row == $#lines $]
<TR>
<TD><INPUT TYPE="radio" VALUE="0" NAME="select_line"></TD>
...
</TR>
[$endif$] 

but it doesnt work if @lines is empty. I've also tried to put a check for an 
empty array, but it seems to bail out already at the table tag in that case. 

This is Embperl 2.0b8. 

 --
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Web:      www.suse.dk
2000 Frederiksberg        Lørdag 12.00-16.00       Email:kar@kakidata.dk 

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message