Teksten vil ikke brydes
Teksten skal brydes efter 200 ord med "..." Som i kan se på hjemmesiden. Så bliver den ikke brudt og den forsætter... Hvad er fejlen?Hjemmesiden: http://trademe.dk.nt5.unoeuro.com
Koden:
<!--#include file="../sys_db-conn.asp"-->
<%
'Definerer kategori-id
strId = Request.QueryString("id")
'Henter alle annoncer inden for den pågældende kategori
strQuery = "SELECT auk_data.headline, auk_data.type, auk_data.auktion_life, auk_data.id, auk_data.image, auk_data.price, auk_data.location, auk_location.location, auk_data.date, auk_data.time, auk_location.name, auk_data.text FROM auk_data,auk_location WHERE auk_location.location = auk_data.location AND DATE_ADD(date, INTERVAL auktion_life DAY) >= CURDATE() ORDER BY auk_data.id DESC LIMIT 30"
Set objRS = conn.Execute(strQuery)
'Udskriver overskrift
Response.Write "<span class=""catHeadline"">Nyeste annoncer</span><br><br>" & vbCrLf
'Udskriver alle annoncer inden for den pågældende kategori
Response.Write "<table cellspacing=""0"" cellpadding=""0"" border=""0"" width=""100%"">" & vbCrLf
Response.Write "<tr>" & vbCrLf
Response.Write "<td width=""425""><b>Tekst</b></td>" & vbCrLf
Response.Write "<td width=""12""></td>" & vbCrLf
Response.Write "<td width=""98"" align=""right""><b>Pris</b></td>" & vbCrLf
Response.Write "<td width=""5""></td>" & vbCrLf
Response.Write "<td width=""154"" align=""right""><b>Info</b></td>" & vbCrLf
Response.Write "</tr>" & vbCrLf
barColor=1
While Not objRS.EOF
strLocation = objRS("name")
Response.Write "<tr>" & vbCrLf
Response.Write "<td colspan=""5"" bgcolor=""#ffffff""></td>" & vbCrLf
Response.Write "</tr>" & vbCrLf
Response.Write "<tr"
If barColor=1 Then
Response.Write " style=""background-color: #f0f5fa; cursor: hand;"" onMouseOver=""this.style.background='#DCEAF9';"" onMouseOut=""this.style.background='#f0f5fa';"" onClick=""document.location.href='default.asp?site=show_ann&id=" & objRS("id") & "';"">" & vbCrLf
Else
Response.Write " style=""background-color: #FFFFFF; cursor: hand;"" onMouseOver=""this.style.background='#DCEAF9';"" onMouseOut=""this.style.background='#FFFFFF';"" onClick=""document.location.href='default.asp?site=show_ann&id=" & objRS("id") & "';"">" & vbCrLf
End If
Response.Write "<td valign=""top"">"
Response.Write "<a href=""default.asp?site=show_ann&id=" & objRS("id") & """><b>" & objRS("headline") & "</b><br></a> "
strText = objRS("text")
If Len(strText) > 200 Then
strText = Left(strText, 200) & "..."
End If
Response.Write(strText)
Response.Write "</td>" & vbCrLf
Response.Write "<td valign=""top"">" & vbCrLf
If objRS("type")=1 Then
Else
Response.Write "<img src=""gfx/ann_" & objRS("type") & ".gif""><br>" & vbCrLf
End If
If len(objRS("image"))>0 Then
Response.Write "<img src=""gfx/camera.gif"">"
End If
Response.Write "</td>" & vbCrLf
Response.Write "<td valign=""top"" align=""right"">" & objRS("price") & ",- kr.</td>" & vbCrLf
Response.Write "<td></td>" & vbCrLf
Response.Write "<td valign=""top"" align=""right"">" & objRS("location") & " - " & strLocation & "<br>" & objRS("date") & " kl. " & objRS("time") & "</td>" & vbCrLf
Response.Write "</tr>" & vbCrLf
If barColor=1 Then
barColor=0
Else
barColor=1
End If
objRS.MoveNext
Wend
Response.Write "</table>" & vbCrLf
conn.close
%>