Forums
This topic is locked
First few words
Posted 22 years ago
1
has voted
22 years ago Anonymous User posted:
I saw this on the DW app dev forum:<%=(left((TextValue),70))%>...
TextValue is the variable for the data you've retrieved from the database,
70 is the number of characters you want to have shown.
I'm looking for a way to do this with whole words. My idea was to set up a function that would count the number of spaces and then cutt off after that, but I don't know how to implement it.
What if you were to tell it to cut off after say the 15th "space" character? The reason I'm not sure how that would work is because I'm not sure how Access stores those characters. Would you happen to know some code that would count the number of spaces (instead of characters) as the data comes out of the database? This way it would stop at 15 words.
Better yet, you could set it to cut off after the first "chr(13)" so that you get exactly the first paragraph. That would be totally sweet... assuming it's possible.
Any ideas anyone?
Why be difficult when you can be impossible?
Replies
Replied 22 years ago
22 years ago Rip Munsterman replied:
There is an extension that does this very easily... I use it all the time... I have put in on my server for you at: www.topdocsonline.com/DisplayXNumberOfWords.mxp
I will leave it up for a couple of days. It works with Dreamweaver UltraDev 4 and MX.
Hope this helps!www.topdocsonline.com/DisplayXNumberOfWords.mxp
I will leave it up for a couple of days. It works with Dreamweaver UltraDev 4 and MX.
Hope this helps!www.topdocsonline.com/DisplayXNumberOfWords.mxp