Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hyperlink a database field to an external url

Status
Not open for further replies.

leifoet

Technical User
Jan 31, 2016
203
BE
With this code I can hyperlink the records (from the field Team) to my next program component => update_form.asp => it works fine

<a href="update_form.asp?Number=<%=FP_FieldURL(fp_rs,"Number")%>">
<%=FP_FieldVal(fp_rs,"Team")%></b></td>

I tried approximately the same code to hyperlink the records (from the field Place) to the (corresponding) external URL in the field URL_place - (for example : (tek-tips.com)
Result => (tek-tips.com)=32%22/ - page not found => because of '=32%22' ?

<a href=<%=FP_FieldVal(fp_rs,"URL_place")%>=<%=FP_FieldURL(fp_rs,"Number")%>">
<%=FP_FieldVal(fp_rs,"Place")%></td>

Thanks for help to find a working code - Leifoet
 
1) Your first example is missing a close anchor tag </a>, but yet has close bold tag </b> out of nowhere. Perhaps </b> was supposed to be </a>?

2) I will assume the first code should look something like this:
Code:
<a href="[highlight #729FCF]update_form.asp[/highlight]?[highlight #8AE234]Number[/highlight]=[highlight #FCE94F]123456[/highlight]">SomeTeamName</a>

So you want to replace the URL (blue part) with <%=FP_FieldVal(fp_rs,"URL_place")%> ... Right?
And you want to repalce the value (yellow part, numbers I just made up) with <%=FP_FieldURL(fp_rs,"Number")%> ... Right again?

If so, where is the query string variable name (green part)? Total guess, but this may be what you want:

Code:
<a href='<%=FP_FieldVal(fp_rs,"URL_place")%>?Number=<%=FP_FieldURL(fp_rs,"Number")%>'>
<%=FP_FieldVal(fp_rs,"Team")%></a></td>
 
Thanks guitarzan, the code works fine now - Leifoet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top