fred
|
| Posted: 06/21/2003, 4:57 AM |
|
I have a simple document library written in php that a customer wants in asp. I'm very rusty in asp and haven't used it in CC. I store the document name in the database as field "ActualFile" In the the document record screen I display the "ActualFile" field as a URL, and I have the following code in he Before show event.
if ($fldActualFile!=null) {
$tmpfile = "\"documents/".$fldActualFile."\"";
$fldActualFile= "<a href=$tmpfile> $tmpfile </a>";
}
else {
$fldActualFile="<a href=DocumentRecord.php?item_id=$flditem_id width=50 height=50>Attach document</a>";
}
Thanks in advance
Fred
|
|
|
 |
rrodgers
|
| Posted: 06/21/2003, 4:12 PM |
|
If fldAcutualFile <> "" Then
tmpfile = """documents/" & fldActualFile & """"
fldActualFile = "<a href=" & tempfile & ">" & tempfile & "</a>"
Else
fldAcualFile = "<a href=""documentrecord.php?item_id=" & flditem_id & """ width=50 height=50>Attach document</a>"
End IF
Or something similar.
rob
|
|
|
 |
fred
|
| Posted: 06/22/2003, 12:51 PM |
|
Thanks, that basically did it, fixed a few typos and took out the unnecessary link if there is no file.
If fldActualFile <> "" Then
tmpfile = """documents/" & fldActualFile & """"
fldActualFile = "<a href=" & tmpfile & ">" & tmpfile & "</a>"
End IF
|
|
|
 |
rrodgers
|
| Posted: 06/22/2003, 2:34 PM |
|
>>typos
Ouch<G>
rob
|
|
|
 |