Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Hyperlink recordset field from access database in web page.

Posted on 2004-04-16
3
Medium Priority
?
279 Views
Last Modified: 2012-05-04
I have a link table in an access database and using a query I want to call the links of an employee into a web page.  The link_name field is text and the link_url field in a hyperlink in the database.

 I need to be able to call the recordset and click on the links which would direct me to another web page.  Currently clicking the link puts the url in the current browser url:

http://localhost/mylinks.asp#http://www.ultra-fitmagazine.com#

Code:
<table border="1" width="100%">
<tr>
<th>My Links</th>
</tr>
                              
<%

sql = "SELECT tblLink.link_name, tblLink.link_url FROM tblEmployee INNER JOIN tblLink ON tblEmployee.User_id = tblLink.user_id"

rs.open sql,myconn,3,3
rs.movefirst
do until rs.eof
%>

<tr><td>
<a href="<%=rs("link_url")%>"><%=rs("link_name")%></a></td></tr>

<%
rs.movenext
Loop      
rs.close
%>      
</table>

Please can somebody help me solve this problem?

Thanks
0
Comment
Question by:ladykh
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 2000 total points
ID: 10847527
try this code

<table border="1" width="100%">
<tr>
<th>My Links</th>
</tr>
                         
<%

sql = "SELECT tblLink.link_name, tblLink.link_url FROM tblEmployee INNER JOIN tblLink ON tblEmployee.User_id = tblLink.user_id"

rs.open sql,myconn,3,3
rs.movefirst
do until rs.eof
%>

<tr><td>
<%
    Dim list,lnk_url
    list = Split(rs("link_url"), "#")
    lnk_url = list(1)
%>
<a href="<%=lnk_url%>"><%=rs("link_name")%></a></td></tr>

<%
rs.movenext
Loop    
rs.close
%>    
</table>
0
 

Author Comment

by:ladykh
ID: 10848638
To venkateshwarr
Thank you very much, it worked perfectly!
Thanks
0
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10848807
you are welcome..
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question