954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help with script asp

I have the following script from a forum that collected data from a form and inserted in the. Mdb These are displayed through a file that reads the database. At this time the display is text, URLs are not active. The script is not so do not really know what to do. I need that URLs appear as a link at this time does not happen. Can you help me? <% IdMensaje = Request.QueryString("IdMensaje") busca = Trim(Request.QueryString("busca")) Set oConn = Server.CreateObject ("ADODB.Connection") Set RS = Server.CreateObject ("ADODB.RecordSet") oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&Server.MapPath(".private//usuarios.mdb") sql = "SELECT * FROM discusion WHERE IdMensaje="&IdMensaje&"" Rs.Open sql, oConn, 1, 1 mensaje = RS("mensaje") %> anadir.gifContestar este mensaje

<%'=== Muestro el mensaje padre. La pregunta inicial ====== Response.Write "Nombre: "&RS("name")&"
" Response.Write "Email: "&RS("mail")&"
" Response.Write "Título del mensaje: "&RS("Title")&"
" Response.Write "Mensaje:
"& AcomodarTXT(mensaje)&"

"
Response.Write ""
'===== Fin pregunta inicial ===== Set RS2 = Server.CreateObject ("ADODB.RecordSet")
sql2 = "SELECT * FROM discusion WHERE IdCabeza="&IdMensaje &" ORDER BY fecha"
RS2.Open sql2, oConn, 1, 1
'===== Respuestas a la pregunta inicial
Do While not RS2.EOF
mensaje2 = RS2("mensaje")
Response.Write "
Nombre: "&RS2("name")&"
"
Response.Write "Email: "&RS2("mail")&"
"
Response.Write "Título del mensaje: "&RS2("title")&"
"
Response.Write "Mensaje:
"%><%= AcomodarTXT(mensaje2)%>



<%
Response.Write ""
RS2.MoveNext
Loop
'===== Fin de respuestas ======
RS2.Close
Set RS2 = nothing
RS.Close
oConn.Close
Set RS = nothing
Set oConn = nothing

Function AcomodarTXT(txt)
txt = Replace (txt, "<", "<")
txt = Replace (txt, ">", ">")
txt = Replace (txt, vbCrLf, "
")
txt = Replace (txt, "''", "'")
acomodarTXT = txt
End function
%>

Jhon100
Junior Poster in Training
95 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

Dear,
which links do you mean? I had a quick look at the script, seems to be fine. Or maybe I have not understood your problem.

Ali

Baradaran
Junior Poster in Training
88 posts since Feb 2007
Reputation Points: 11
Solved Threads: 7
 

I need to change the funcion AcomodarTXT(mensaje2) >"& AcomodarTXT(mensaje)&"
This function dont'convert url on active links, it is plan text
But I don't know how I change it?

Response.Write "Mensaje:
"%>><%= AcomodarTXT(mensaje2)%>



<%
Response.Write ""
RS2.MoveNext
Loop
'===== Fin de respuestas ======
RS2.Close
Set RS2 = nothing
RS.Close
oConn.Close
Set RS = nothing
Set oConn = nothing

Function AcomodarTXT(txt)
txt = Replace (txt, "<", "<")
txt = Replace (txt, ">", ">")
txt = Replace (txt, vbCrLf, "
")
txt = Replace (txt, "''", "'")
acomodarTXT = txt
End function

Jhon100
Junior Poster in Training
95 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You