Hyperlink from Access not displaying correctly (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


xterradane -> Hyperlink from Access not displaying correctly (4/22/2002 20:10:40)

I don't know why this is not working, either ASP code or Access DB set up wrong. I have a field for hyperlink in Access databse. When it displays it looks like this:
www.nasm.org#http://www.nasm.org#
Any ideas? Is it ASP or DB problem?





rdouglass -> RE: Hyperlink from Access not displaying correctly (4/23/2002 8:23:53)

Can you post the code the page uses to display the record?

 




alveyuk -> RE: Hyperlink from Access not displaying correctly (4/23/2002 9:12:49)

Access fields defined with the type of 'hyperlink' do not work within FrontPage DRW. You will need to change or copy these details into a text field and build the hyperlink in one of the following ways:-

Either 1) store the full html code for the hyperlink in an access text field
OR 2) use an Access 'query' to build the hyperlink from text fields within the table
OR 3) use the DRW and hyperlink tool with optional parameters to build the html for the hyperlink from Access text columns.

Have a nice day now!!!

Ken Alvey




xterradane -> RE: Hyperlink from Access not displaying correctly (4/23/2002 15:36:07)

<%

Dim rsJob
Set rsJob = Server.CreateObject("ADODB.Recordset")
strSQL="SELECT * FROM CertificationLinks ORDER BY Hits DESC;"
rsJob.Open strSQL, objConn

If Not rsJob.EOF Then
Response.Write "<TABLE ALIGN=""CENTER"" BORDER=""O"" CELLPADDING=""4"" WIDTH=""80%"">" &_
"<TR><TH WIDTH=""40%"" bgcolor=""#0099CC""><P ALIGN=""LEFT""><FONT COLOR=""#FFFFFF"" SIZE=""2"" FACE=""VERDANA"">Certifying Body</FONT></TH>" &_
" <TH WIDTH=""25%"" bgcolor=""#0099CC""><FONT COLOR=""#FFFFFF"" SIZE=""2"" FACE=""VERDANA"">URL</FONT></TH>" &_
" <TH WIDTH=""20%"" bgcolor=""#0099CC""><FONT COLOR=""#FFFFFF"" SIZE=""2"" FACE=""VERDANA"">Description</FONT></TH>" &_
" <TH WIDTH=""15%"" bgcolor=""#0099CC""><FONT COLOR=""#FFFFFF"" SIZE=""2"" FACE=""VERDANA"">Number of Hits</FONT></TH>" &_
" </TR>"
Do While Not rsJob.EOF
Response.Write "<TR ALIGN=CENTER>" &_
"<TD P ALIGN=""LEFT""> " & rsJob("Name") &"</TD>" &_
"<TD> " & rsJob("URL") &"</TD>" &_
"<TD> " & rsJob("Description") &"</TD>" &_
"<TD> " & rsJob("Hits") &"</TD>" &_
"</TR>"
rsJob.MoveNext
Loop
Response.Write "</TABLE>"
Else
Response.Write "<DIV ALIGN=""CENTER"">Currently there are no links in this section."
End If
rsJob.Close
Set rsJob = Nothing
%>


Please note that I am not using FrontPage's DRW.





xterradane -> RE: Hyperlink from Access not displaying correctly (4/24/2002 0:21:18)

I have made some changes and am very close to getting what I want. I made the Access DB URL field a text field and entered the URL's like so: www.funfitness.com . Then I created some ASP code to show the link. However, it looks like this when it displays:

www.fit-jobs.com/www.funfitness.com. Any ideas? The link code is the same you would use for any ASP hyperlink. I copied it from other pages I use a link with and it works fine.

Gail





rdouglass -> RE: Hyperlink from Access not displaying correctly (4/24/2002 10:56:38)

Do you actually have the HTML code (<a href...>) in the Access text field or is it just the site address (without HTML)?

 




xterradane -> RE: Hyperlink from Access not displaying correctly (4/24/2002 18:26:46)

site address without HTML code






rdouglass -> RE: Hyperlink from Access not displaying correctly (4/25/2002 8:33:20)

What happens if you change this line:

"<TD> " & rsJob("URL") &"</TD>" &_

to

"<TD> <a href='http://" & rsJob("URL") & "'>" & rsJob("URL") & "</a> </TD>" &_


 




xterradane -> RE: Hyperlink from Access not displaying correctly (4/25/2002 15:38:55)

It worked! Thanks so much.



Edited by - xterradane on 04/25/2002 15:43:20




Mulf -> RE: Hyperlink from Access not displaying correctly (5/24/2002 14:41:19)

I'm running into a similar problem. Access hyperlinks are handled as desc#link# and are passed in that way. My application has a description that is different than the link.(it links documents) My link shows http://docdesc#\\server\location\doc.doc#
I need the hyperlink to point to only \\server\location\doc. It seems like I need to parse out the field between the #s. Does anyone know of another way. I cannot change the Access field to text as it is being used for updates.





Mulf -> RE: Hyperlink from Access not displaying correctly (5/28/2002 15:52:18)

I see there are a lot of views on this subject. I figured a way to edit the fpdblib.inc and make it work. If anyone wants a rundown.. let me know.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625