This topic is locked
[SOLVED]

 Hyperlink construction with suffix

10/19/2006 1:14:58 PM
ASPRunnerPro General questions
R
rgke author

Is it possible to have the variable data inserted in the middle of a hyperlink, so instead of, say,
http:/url/url/data
it could be formatted
http:/url/url/data/xxx
where data is the data coming from the content of the field?

J
Jane 10/20/2006

Hi,
set custom on the "View as" settings dialog and add your custom code in it.

Here is a sample:

$value = "<a href=\"http:/url/url/".$value."/xxx\">".$value."</a>";

R
rgke author 10/20/2006

brilliant, thanks

J
JOHNF777 12/5/2006

I've got the same issue. I'm not too familiar with the coding. Can someone help me apply this to my application?
I have a field called RecNo and I want it to link to a file that's a PDF. So the filename is "RecNo.pdf".
How do I use the code?
$value = "<a href=\"http:/url/url/".$value."/xxx\">".$value."</a>";
Thanks.

J
Jane 12/6/2006

John,
use the following code:

strValue="<a href=""UploadFolder/"&strValue&".pdf"">"&strValue&"</a>"



where UploadFolder is your actrual folder name where your files are stored.

J
JOHNF777 12/6/2006

Thanks, That works!
I'm loving this program more and more.....
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=13567&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />