Making A URL in a database a hyperlink

Results 1 to 2 of 2

Thread: Making A URL in a database a hyperlink

  1. #1
    Don Makoviney Guest

    Default Making A URL in a database a hyperlink

    I have the following code on a page that works fine, however, I want to make the URL in the results a hyperlink. . . <BR><BR>I added a comment right before the line I am speaking about so it will be easy to find. Here&#039s the code:<BR><BR>&#060;HTML&#062;<BR>&#060;HEAD&#062;< BR>&#060;TITLE&#062;GOSWFL.com&#060;/TITLE&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR><BR>&#060;%<BR> Dim objConn<BR> Dim objRS<BR> Set objConn = Server.CreateObject ("ADODB.Connection")<BR> Set objRS = Server.CreateObject ("ADODB.Recordset")<BR><BR> Department = Request.QueryString("Department")<BR> Category = Request.QueryString("Category")<BR><BR> objConn.Open "DSN=goswfl"<BR><BR> Dim strSQL<BR> strSQL="SELECT * FROM clients WHERE clientDept= &#039" & Department & "&#039 AND clientCategory= &#039" & Category & "&#039 AND priTenant= Yes AND clientActive= Yes"<BR><BR> objRS.Open strSQL, objConn<BR><BR> While Not objRS.EOF<BR> Response.Write("&#060;table border=1&#062;")<BR> Response.Write("&#060;tr&#062;")<BR> Response.Write(" &#060;td width=300&#062;" & objRS("clientName") & "&#060;/td&#062;")<BR> Response.Write(" &#060;td width=300&#062;" & objRS("clientPhone") & "&#060;/td&#062;")<BR> Response.Write("&#060;/tr&#062;")<BR> Response.Write("&#060;tr&#062;")<BR> Response.Write(" &#060;td width=600 colspan=2&#062;" & objRS("clientDesc") & "&#060;/td&#062;")<BR> Response.Write("&#060;tr&#062;")<BR>&#039This is the variable that I want to make a hyperlink it is a URL in and of itself, and I would like it to go to that URL<BR> Response.Write(" &#060;td width=600 colspan=2&#062;" & objRS("siteURL") & "&#060;/td&#062;")<BR> Response.Write("&#060;/tr&#062;")<BR> objRS.MoveNext<BR> Wend<BR>Response.Write("&#060;/table&#062;")<BR> objRS.Close<BR> objConn.Close<BR> Set objRS = Nothing<BR> Set objConn = Nothing<BR><BR>%&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR><BR>Thanks In Advance For Your Help<BR><BR>Don Makoviney

  2. #2
    Join Date
    Dec 1969
    Posts
    572

    Default RE: Making A URL in a database a hyperlink

    How about this:<BR><BR>Response.Write(" &#060;td width=600 colspan=2&#062;&#060;a href=" & objRS("siteURL") & "&#062;" & objRS("siteURL") & "&#060;/td&#062;")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •