Hi,
I am having problems displaying "Image-Not-Available" image, when record is listed with "Show All records" from the menu.
There is no image loaded there at all..( like the code part -unless- has no effect )
But, when a new object is added to a database, and confirmation page is displayed with information that has been added, there is an "Image-Not-Available" Image, displayed. So why is it working here and not at the Show/List All Records page ?
This is the code used i html.pl file:
<td>
|; # to close off a previous print qq| statement
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file" border=1 width=160 height=120>|;
$graphic_found=1;
}
}
unless ($graphic_found) {
print qq|<img src="$SAVE_DIRECTORY_URL/unavailable.gif">|;
}
print qq|
</td>
Thank You In Advance!
Regards,
[vildan]
I am having problems displaying "Image-Not-Available" image, when record is listed with "Show All records" from the menu.
There is no image loaded there at all..( like the code part -unless- has no effect )
But, when a new object is added to a database, and confirmation page is displayed with information that has been added, there is an "Image-Not-Available" Image, displayed. So why is it working here and not at the Show/List All Records page ?
This is the code used i html.pl file:
<td>
|; # to close off a previous print qq| statement
opendir (GRAPHIC, "$SAVE_DIRECTORY") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $rec{$db_key} . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
print qq|<img src= "$SAVE_DIRECTORY_URL/$file" border=1 width=160 height=120>|;
$graphic_found=1;
}
}
unless ($graphic_found) {
print qq|<img src="$SAVE_DIRECTORY_URL/unavailable.gif">|;
}
print qq|
</td>
Thank You In Advance!
Regards,
[vildan]