Solved

Hyperlink recordset field from access database in web page.

Posted on 2004-04-16
3
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Writing lines of code from a form output in script within a results page 2 47
CREATE DATABASE 3 45
MS SQL + date 6 54
P3P validator , ASP, PHP ,Https and Http links 3 44
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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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