Hi! I am having a problem getting the URL to display as a link in search results. The main portion of the URL does not change so I have made it a hidden field (FileURL). When the actual file name is added in the field FileName, I would like for it to append to the FileURL when displayed and be a link to the file. Help would be very much appreciated to identify what corrections are needed. Thanks!
%db_def = (
RecordID => [0, 'numer', -1, 8, 1, '', ''],
ImageName => [1, 'alpha', 35, 250, 0, '', '' ],
FileURL => [2, 'alpha', -1, 250, 1, '', '^http://IPADDRESS/FOLDER/'],
FileName => [3, 'alpha', 35, 250, 0, '', '' ],
LinkURL => [4, 'alpha', 40, 250, 0, 'http://', '^http://' ],
Height => [5, 'numer', 3, 3, 0, '', '' ],
Width => [6, 'numer', 3, 3, 0, '', '' ],
AltText => [7, 'alpha', 35, 250, 0, '', '' ]
);
at sub html_record, I have
$url{'LinkURL'} = $rec{'LinkURL'};
$url{'LinkURL'} =~ s/<\/?B>//g;
$url{'FileURL'} = $rec{'FileURL'};
$url{'FileURL'} =~ s/<\/?B>//g;
print qq|
<input type=hidden name="uid" value="$db_uid">
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">|;
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ImageName:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'ImageName'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>FileName:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'FileURL'}$rec{'FileName'}">$url{'FileURL'}$rec{'FileName'}</a>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>LinkURL:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'LinkURL'}">$rec{'LinkURL'}</a>
- - - rest of table
Neither FileURL nor LinkURL display as links. FileURL does not display at all, LinkURL does display as text.
I am a true newbie on both db's and perl, please bear that in mind when replying. Thanks so much for taking the time to even read my request for help!
------------------
Ogie
We all have challenges in this life, how you deal with them can set you apart!
%db_def = (
RecordID => [0, 'numer', -1, 8, 1, '', ''],
ImageName => [1, 'alpha', 35, 250, 0, '', '' ],
FileURL => [2, 'alpha', -1, 250, 1, '', '^http://IPADDRESS/FOLDER/'],
FileName => [3, 'alpha', 35, 250, 0, '', '' ],
LinkURL => [4, 'alpha', 40, 250, 0, 'http://', '^http://' ],
Height => [5, 'numer', 3, 3, 0, '', '' ],
Width => [6, 'numer', 3, 3, 0, '', '' ],
AltText => [7, 'alpha', 35, 250, 0, '', '' ]
);
at sub html_record, I have
$url{'LinkURL'} = $rec{'LinkURL'};
$url{'LinkURL'} =~ s/<\/?B>//g;
$url{'FileURL'} = $rec{'FileURL'};
$url{'FileURL'} =~ s/<\/?B>//g;
print qq|
<input type=hidden name="uid" value="$db_uid">
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">|;
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ImageName:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'ImageName'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>FileName:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'FileURL'}$rec{'FileName'}">$url{'FileURL'}$rec{'FileName'}</a>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>LinkURL:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'LinkURL'}">$rec{'LinkURL'}</a>
- - - rest of table
Neither FileURL nor LinkURL display as links. FileURL does not display at all, LinkURL does display as text.
I am a true newbie on both db's and perl, please bear that in mind when replying. Thanks so much for taking the time to even read my request for help!
------------------
Ogie
We all have challenges in this life, how you deal with them can set you apart!