Login | Register | FAQ

a href in response.write

+ Post a reply

2 posts Page 1 of 1

a href in response.write

by michelle » Sat May 24, 2014 7:04 am

hi i cannot get the url the work in this script what am i doing wrong please

Code: Select all
<body text="#FFFFFF" bgcolor="#000000">

<center><table border="0" width="90%" cellspacing="0" cellpadding="0" bgcolor="#D2D2D2">
         <td valign="top"><div>
            <table border="0" width="100%" cellspacing="0" cellpadding="0">
                        <td valign="top" align="left" bgcolor="#000000">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
Dim adoCon          
Dim rsGuestbook         
Dim strSQL   
Dim href
Dim title   

Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("forum.mdb")
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT *, FORMAT(mDATE,'Dddd dd mmmm yyyy') AS fDATE FROM messages order by mDATE desc"

rsGuestbook.Open strSQL, adoCon

href = rsGuestbook("video")
title = "Watch Video"

Do While not rsGuestbook.EOF
Response.write "<tr><td colspan=""5""><br><hr color=""#333333"" size=""3""></td><tr>"
Response.Write "<TR valign=""center""><td valign=""center""><font face=""Calibri"" color=""ffffff"" size=""3"">"  & rsGuestbook("fDATE") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><b><font face=""Calibri"" color=""666666""  size=""4"">" & rsGuestbook("title") & "</a></td></b></tr>"
Response.write "<tr><td valign=""center""><br><font face=""Calibri"" color=""ffffff""  size=""3"">" & rsGuestbook("message") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><font face=""Calibri"" color=""ffffff""  size=""3"">" & rsGuestbook("message2") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><font face=""Calibri"" color=""ffffff""  size=""3"">" & rsGuestbook("message3") & "</td></tr>"
Response.write "<tr><td valign=""center""><br><img src=""" & rsGuestbook("image1") & """  border=""0"" bordercolor=""#000"" width=""33%""><img src=""" & rsGuestbook("image2") & """  border=""0"" bordercolor=""#000"" width=""33%"" ><img src=""" & rsGuestbook("image3") & """  border=""0"" bordercolor=""#000"" width=""33%""></td></tr>" 
Response.write "<tr><td valign=""center""><br><a href='"& href &"'>" & title & "</a></td></tr>"



'Reset server objects
Set rsGuestbook = Nothing
Set adoCon = Nothing
User avatar


  • Posts: 1
  • Joined: Sat May 24, 2014 7:02 am

Re: a href in response.write

by XainPro » Tue May 27, 2014 9:49 am

asp classic is no more supported by Microsoft nor by any one else shit to .net ;)
User avatar


  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm

+ Post a reply

Page 1 of 1