Forums

This topic is locked

Dynamic Links

Posted 18 Dec 2001 17:19:51
1
has voted
18 Dec 2001 17:19:51 Bubba Joe posted:
Well long time no talk. An I have a new problem. I am trying to get a dynamic link to work and I am having a little problem, I cant get it to work.

What I am trying to do is this, I have a Member page that will list a favorite link. And in this favorite link I would like to have it to where the link would show up for people to click on, but right now all you can see is the text and it is not a working link. I have tried to enter the following and it turns out to be a link but it doen't work right.

<a href="<%=(rsResults.Fields.Item("FavoriteURL".Value)%>"><%=(rsResults.Fields.Item("FavoriteURL".Value)%></a>

Any suggestions on what I should do to get this to work?

<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>

Edited by - Bubbajoe on 18 Dec 2001 17:22:48

Replies

Replied 18 Dec 2001 21:17:57
18 Dec 2001 21:17:57 Joel Martinez replied:
when you load the page, right click, and choose "view source"
find that link in the HTML and see how it looks, that will tell you what is wrong <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 18 Dec 2001 23:51:34
18 Dec 2001 23:51:34 Bubba Joe replied:
Ok looking at the source righ tnow there is nothing showing I just have the
&lt;div align="right"&gt;Favorite Site:&lt;/div&gt;
&lt;/td&gt;
&lt;td width="70%"&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/td&gt;
so...
I tried it without the quotes I got the same result.
soo OK lets try it like this...
&lt;%&lt;a href==(rsResults.Fields.Item("FavoriteURL".Value)&gt;%&gt;&lt;%=(rsResults.Fields.Item("FavoriteURL".Value)%&gt;&lt;/a&gt;with the deliniators in the front. and I get..
Microsoft VBScript compilation error '800a0400'

Expected statement

/quake_site/clanresult.asp, line 214

&lt;a href==(rsResults.Fields.Item("FavoriteURL".Value)&gt;
^

Ok well do you have any more suggestions?

Replied 19 Dec 2001 02:26:06
19 Dec 2001 02:26:06 Joel Martinez replied:
that would make me think that there was no data in the recordset... check your database

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 19 Dec 2001 05:05:32
19 Dec 2001 05:05:32 Bubba Joe replied:
well I know that there is data in the field because everything shows up when I just put the code for it to show up as not a link.
users.htcomp.net/Quake_site/members.asp
the code for this link is this
&lt;tr&gt;
&lt;td width="30%"&gt;
&lt;div align="right"&gt;Favorite Site:&lt;/div&gt;
&lt;/td&gt;
&lt;td width="70%"&gt;&lt;%=(rsResults.Fields.Item("FavoriteURL".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

The Code for the this next link is the code that I showed you before.
users.htcomp.net/Quake_site/members2.asp
here is the code again...
&lt;tr&gt;
&lt;td width="30%"&gt;
&lt;div align="right"&gt;Favorite Site:&lt;/div&gt;
&lt;/td&gt;
&lt;td width="70%"&gt;&lt;a href="&lt;%=(rsResults.Fields.Item("FavoriteURL".Value)%&gt;"&gt;&lt;%=(rsResults.Fields.Item("FavoriteURL".Value)%&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;

So I know that the field has data but I am not sure what to use to get it to work.

Thank you for the help Joel I noticed that I forgot to thank you for the responce




Edited by - bubbajoe on 19 Dec 2001 05:15:17

Edited by - bubbajoe on 19 Dec 2001 05:46:47
Replied 19 Dec 2001 07:15:37
19 Dec 2001 07:15:37 Joel Martinez replied:
hmm, I checked the members2 page, and it seems you're halfway there... the href property had #www.udzone.com#, so perhaps you forgot to put the RS field between the &lt;a&gt; tags?

hmm, actually, I have an idea. read this FAQ and try what is suggested, even if the field in question is not a memo field
www.udzone.com/showDetail.asp?TypeId=7&NewsId=1219

also, I don't think a browser would like pound signs around the URL.

Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 19 Dec 2001 22:47:52
19 Dec 2001 22:47:52 Bubba Joe replied:
Well the # around the URL is an automatic addin. I am using an access 2000 database even though... wait I am going to change the setting for that field from a URL to just text and lets see how that goes. Also thank you for the link I will also look at it.

Reply to this topic