Hola Nuno,
el otro dia me paseste una función para mostrar las primeras palabras de
un texto.
la funcion que me pasaste la tengo en funciones.inc.asp
<%
function cut_text(strg,num)
dim Comp, tRobs, med
Comp = Len(strg)
tRobs = strg
num = cint(num)
if num < Comp then
med = mid(tRobs,num,1)
if med <> " " then
while not med = " "
num = num - 1
if num > 0 then
med = mid(tRobs,num,1)
tRobs = left(tRobs,num)& "..."
else
med = " "
end if
wend
else
tRobs = left(tRobs,num)& "..."
end if
end if
cut_text = tRobs
end function
%>
en la pagina donde quiero llamarla tengo:
<!--#include file="../includes/functions.inc.asp" -->
response.write cut_text(rs("texto"), 10)
tan solo muestra tres puntos (...)
no encuentro el error,
sabes que puede pasar?
salufdos,
Leer las respuestas