Misty wrote:
The end tags for paragraphs are </p>. |
The end tags are not </p>. That is why the script is not working. There is a <p> at the beginning of each paragraph only. Need to search for <p> instead of </p>. New code in a moment...
...try this instead:
FUNCTION ParaTrim(input)
intP = 0
intL = 0
FOR count = 1 to LEN(input)
IF MID(input,count,3)="<p>" THEN
intP=intP+1
IF intP=5 THEN
intL=count
END IF
END IF
NEXT
IF intL>0 THEN
ParaTrim = LEFT(input,intL-1) & "...."
ELSE
ParaTrim = input
END IF
END FUNCTION
You can delete the & "...." if you don't like the elipses ....
Edited by dj1811 - 22 February 2005 at 6:47pm