antal ord derefter linieskift Function CutString
to problemer med følgende kode:l. skriver kun sidste post i db ud efter funktionen
2. vil gerne at den skriver x antal karaktere derefter linieskift efter mellemrum.
kode:
<%
Function CutString (YouString, intCut)
if len(YouString) > intCut then
posstart=instr (intCut, YouString, " ")
if (posstart <> 0) then
CutString = Left(YouString, posstart) & "<br>"
Exit Function
end if
end if
CutString = YouString
End function
%>
<html>
<head>
</head>
<body>
<table valign="top" align="left" width="50" cellpadding="5" cellspacing="5">
<!-- #include file="../dataopkald.asp" -->
<%
Conn.Open DSN
strSQL = "Select * From billeder WHERE webside LIKE 'billed2'"
Set rs = Conn.Execute(strSQL)
%>
<%
DO WHILE NOT rs.EOF
YouString = rs("tekst")
%>
<tr>
<td align="left"><%=CutString(YouString, 32)%></td>
</tr>
<%RS.MoveNext
Loop
Conn.Close
Set Conn = Nothing%>
</table>
</body>
hjælppppppppppppppppppppppppppp
