Gossamer Forum
Home : Products : DBMan : Customization :

Anyone good at finding syntax errors?

Quote Reply
Anyone good at finding syntax errors?
Hi! man you can't beat the people around here. they are so helpful.

Here is the error:

CGI ERROR==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: syntax error at ./html.pl line 305, near ""arial" size"
syntax error at ./html.pl line 310, near "|;"
Unmatched right bracket at ./html.pl line 311, at end of line
Script Location : /home/racedaze/racedaze-www/cgi-bin/racedaze/db.cgi
Perl Version : 5.00404Setup File : default.cfg


Here is the html_record which is causing the error:

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana" Size=2 Color=#003399';
my $font = 'Font face="Verdana" Size=2';

print qq|
<FORM><TABLE WIDTH="450" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD WIDTH="162" HEIGHT="20" NOWRAP BGCOLOR="#d0d2b0">
<B><FONT FACE="Arial"> $rec{'Status'}|; if ($rec{'Due'}) {
print qq|
Due $rec{'Due'}|;
}
print qq|
</FONT></B></TD>
<TD WIDTH="267" HEIGHT="20" BGCOLOR="#d0d2b0">
<B><FONT SIZE="-1" FACE="Arial">$rec{'Date'}</FONT></B></TD>
<TD WIDTH="20" HEIGHT="20" NOWRAP BGCOLOR="#d0d2b0"></TD>
</TR>
<TR>
<TD ROWSPAN="5" VALIGN="TOP" WIDTH="162">
<IMG SRC="pageimage/example.gif" WIDTH="150" HEIGHT="113" ALIGN="BOTTOM"
BORDER="0" NATURALSIZEFLAG="3"><BR>
<IMG SRC="pageimage/enlarge.gif" WIDTH="150" HEIGHT="35" ALIGN="BOTTOM"
BORDER="0" NATURALSIZEFLAG="3"></TD>
<TD ROWSPAN="5" VALIGN="TOP" WIDTH="267">
<font face="arial" size="-1">$rec{'Title'}<BR>
$rec{'Manu'}<BR>
<B>Item number:</B> $rec{'Itemno'}</font><BR>|;
if ($rec{'Scale'}) {
print qq|
<font face="arial" size="-1"><B>Scale</B></font>$rec{'Scale'}<BR> |;
}
print qq|
if ($rec{'Size'}) {
print qq|
<font face="arial" size="-1"><B>Sizes </B></font><select name="size"> |;
}
print qq|
if ($rec{'xs'}) {
print qq|
<option name="xs">Xsmall |;
}
print qq|
if ($rec{'sm'}) {
print qq|
<option name="sm">Small |;
}
print qq|
if ($rec{'med'}) {
print qq|
<option name="med">Medium |;
}
print qq|
if ($rec{'lg'}) {
print qq|
<option name="lg">Large |;
}
print qq|
if ($rec{'xlg'}) {
print qq|
<option name="xlg">Xlarge |;
}
print qq|
if ($rec{'xxlg'}) {
print qq|
<option name="xxlg">XXlarge |;
}
print qq|
if ($rec{'xxxlg'}) {
print qq|
<option name="xxxlg">XXXlarge |;
}
print qq|
if ($rec{'Size'}) {
print qq|
</select> |;
}
print qq|<BR>
<font face="arial" size="-1"><b>Price </B>$rec{'Price'} Each |;
}
if ($rec{'Min'}) {
print qq|
($rec{'Min'} minimum)|;
}
print qq|<BR>|;
}
if ($rec{'QtyPrice'}) {
print qq|
<font face="arial" size="-1">$rec{'QtyPrice'} if you buy $rec{'QtyPcs'} or more.</font>|;
}
print qq|</TD>
<TD WIDTH="20" HEIGHT="23" BGCOLOR="#d0d2b0">
</TD>
</TR>
<TR>


<TD WIDTH="20" HEIGHT="23" BGCOLOR="#d0d2b0">
</TD>
</TR>
<TR>


<TD WIDTH="20" HEIGHT="23" BGCOLOR="#d0d2b0">
</TD>
</TR>
<TR>


<TD WIDTH="20" HEIGHT="22" BGCOLOR="#d0d2b0">
</TD>
</TR>
<TR>


<TD WIDTH="20" HEIGHT="23" BGCOLOR="#d0d2b0">
</TD>
</TR>
<TR>
<TD COLSPAN="2">
<font face="arial" size="-1">$rec{'Description'}</font></TD>

<TD WIDTH="20" HEIGHT="23" BGCOLOR="#d0d2b0">
</TD>
</TR>
<TR>
<TD WIDTH="162" HEIGHT="20" NOWRAP></TD>
<TD WIDTH="267" HEIGHT="20">
</TD>
<TD WIDTH="20" HEIGHT="20" NOWRAP BGCOLOR="#d0d2b0"></TD>
</TR>
<TR>
<TD WIDTH="162" HEIGHT="20" BGCOLOR="#d0d2b0">
</TD>
<TD WIDTH="267" HEIGHT="20" BGCOLOR="#d0d2b0">
</TD>
<TD WIDTH="20" HEIGHT="20" BGCOLOR="#d0d2b0">
</TD>
</TR>
</TABLE></FORM>|;
}


Thanks for any help!!!
Chris

[This message has been edited by ChrisE (edited February 25, 1999).]
Quote Reply
Re: Anyone good at finding syntax errors? In reply to
<B>Item number:</B> $rec{'Itemno'}</font><BR>|;
if ($rec{'Scale'}) {
print qq|
<font face="arial" size="-1"><B>Scale</B></font>$rec{'Scale'}<BR> |;
}
print qq|
if ($rec{'Size'}) {
print qq|
<font face="arial" size="-1"><B>Sizes </B></font><select name="size"> |;
}

Extra line in there. Smile


------------------
JPD