logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 09-11-2008, 08:48 PM   #1
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default ASP recordset Link

Howdy there folks!
I got the following piece of code in a table and would like to make whats inside the table into a link:
Code:
<td><%=(rsDevices.Fields.Item("Device IP").Value)%></td>
I have tried the following
Code:
<td><a href = "<%=(rsDevices.Fields.Item("Device IP").Value)%>"><%=(rsDevices.Fields.Item("Device IP").Value)%></a> </td>
But this makes the link but it keeps the hieracry and want this to open in a new window. Mind you that this information is being gotten from a recordset.

Thanks for your help!
rico1931 is offline   Reply With Quote
Old 09-12-2008, 02:47 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,174
Default

what is the value? an example maybe.
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 09-12-2008, 04:02 AM   #3
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

its a repeating record so the value is what is stored in the DB table an example would be one column has names and the other has email address I want to make email address table links but the way it is set up in DW is that its a repeating record so it goes through the DB till it runs out of rows to fill. The links are easy to create when just txt is put in with no asp. I just want to know how to make ASP code into links
rico1931 is offline   Reply With Quote
Old 09-12-2008, 11:30 AM   #4
lux
 
Join Date: Apr 2006
Posts: 313
Default

to open a link in a new window include target="_blank" inside the <a> tag
__________________
"i was going to say that!" - davidj 2008
lux is offline   Reply With Quote
Old 09-13-2008, 06:22 PM   #5
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

right but if you have a record set with an <a> tag like the one i posted above
Code:
<td>
   <a href = "<%=(rsDevices.Fields.Item("Device IP").Value)%>">
   <%=(rsDevices.Fields.Item("Device IP").Value)%></a>
 </td>
it disappears.
rico1931 is offline   Reply With Quote
Old 09-15-2008, 02:36 AM   #6
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,174
Default

which was why I asked what the values were
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 09-18-2008, 06:33 PM   #7
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Thumbs up Answer!!!

Code:
<td><input type = "hidden" name="Device IP" value="<%=(rsDevices.Fields.Item("Device IP").Value)%>"/>
<a href="http://<%=(rsDevices.Fields.Item("Device IP").Value)%>" target="_blank"> 
<%=(rsDevices.Fields.Item("Device IP").Value)%>
</a>
</td>
This is the answer on how to get a record set to display links in a dif window. Say you have a DB with 20 items and have a record set and rs navigation buttons to scroll through 5 itsma at a time. Within the record set there will be links in some colume you may want. Edit, ip address, anything you want as a link. This allows you to put links on txt in your DB so you don't have to hand code for every single item somehow.

Hope this helps the forum!
rico1931 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:17 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com