If you
are using a table to display the data again, you could try a nowrap in the td
tag, like so <td nowrap></td> (which would not help if it's one
complete word, no spaces).
Otherwise I guess you would need to loop over each word, by using the
space as the delimiter, check the length of each word (len()) if greater than 50
break it up with (mid()) insert a break (<br />) and append it
to a variable. Append the word even if its not greater than 50 so you get your
original string back with words greater than 50 chars split up. Off course I
think this would really use up some processing power.
Taco
--------Original Message-----
From: John Bishop [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 June 2003 2:03 PM
To: CFAussie Mailing List
Subject: [cfaussie] Insert spaces in long words...?****************************************************************This e-mail is subject to the disclaimer contained at the bottom of this message.*****************************************************************:Hi guys,I'm working on a site that allows users to enter a message into a textbox, which is parsed (using CF_StripHtml tag from the MM Exchange) to remove all HTML tags, then inserted into a DB table. The user is then redirected to a page that displays the posts from the table they've just posted to. Pretty basic stuff.
What I'm looking for is suggestions as to how to break long words (ie, longer than 50 characters) into smaller words, by inserting spaces into the string. Currently, if I post a long word with no spaces into the DB, then it screws the table layouts on the page that displays the post, as the text won't wrap.I'm sure you guys have had to deal with this problem before... any 'best-practice' suggestions would be greatly appreciated!Cheers all,jb :):*******************************************************************The information transmitted in this message and attachments (if any)
is intended only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or taking
of any action in reliance upon this information, by persons or entities
other than the intended recipient is prohibited.If you have received this in error, please contact the sender and delete this
e-mail and associated material from any computer.The intended recipient of this e-mail may only use, reproduce, disclose or
distribute the information contained in this e-mail and any attached files,
with the permission of the sender.This message has been scanned for viruses and cleared by MailMarshal.********************************************************************---
:
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---------------------------------------------------------------------------- This email, together with any attachments, is intended for the named recipient(s) only and may contain privileged and confidential information. If received in error, please inform the sender as quickly as possible and delete this email and any copies from your computer system network. If not an intended recipient of this email, you must not copy, distribute or rely upon it and any form of disclosure, modification, distribution and/or publication of this email is prohibited. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ---------------------------------------------------------------------------- |
