I'm sorry if I'm posting this in the wrong place, but it's late and I'm
getting really frustrated.
I've downloaded and installed the "Crop Sentence" extension from the
exchange. When I run it , I get this syntax error.
Microsoft VBScript compilation error '800a03ea'
Syntax error
/search/quickquery.asp, line 467
FUNCTION CropSentence(strText, intLength, strTrial)
^
I haven't hand coded any of this, the code has been added by the extension
Here is the code I'm using to call the function:
<% =(CropSentence((rsProfile.Fields.Item("MoreInfo").Value), 100, "...")) %>
Here is the code for the function:
<%
FUNCTION CropSentence(strText, intLength, strTrial)
Dim wsCount
Dim intTempSize
Dim intTotalLen
Dim strTemp
wsCount = 0
intTempSize = 0
intTotalLen = 0
intLength = intLength - Len(strTrial)
strTemp = ""
IF Len(strText) > intLength THEN
arrTemp = Split(strText, " ")
FOR EACH x IN arrTemp
IF Len(strTemp) <= intLength THEN
strTemp = strTemp & x & " "
END IF
NEXT
CropSentence = Left(strTemp, Len(strTemp) - 1) & strTrial
ELSE
CropSentence = strText
END IF
END FUNCTION
%>
Has anyone ever used this and gotten it to work? Can anyone see what is
wrong with it?
Thanks,
Ricki
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]