Are the Char(13) and Char(10) in the right order? Try switching them to 10
and 13 respectively.

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 10:36 AM
To: CF-Talk
Subject: Building a string


OK, I've got one that has me stumped.
I am in the process of building a text string to be passed into a plain
text email, which will later be parsed according to it's line breaks.
Not building within the cfmail tags (because that's a nightmare in it's
own right) but within a variable:

<cfset msgBody = "Here's the start.#chr(13)##chr(10)#">
<cfset msgBody = msgBody & "A little more here.#chr(13)##chr(10)#">
<cfloop list="#form.fieldnames#" index="x">
     <cfif not listfindnocase(listexclude,x)>
         <cfset msgBody = msgBody & replace(x,"_"," ","all") & ": ">
         <cfif form[x] neq "">
             <cfset msgBody = msgBody & form[x]>
         <cfelse>
             <cfset msgBody = msgBody & "(not required and empty)">
         </cfif>
         <cfset msgBody = msgBody & "#chr(13)##chr(10)#">
      </cfif>
</cfloop>

My problem is, sometimes I don't get line breaks. There does not appear
to be any rhyme nor reason, it just happens. I'm still getting my
fieldnames and values (or lack of) for all fields, just, on occasion,
without warning or reason, I lose my linebreaks. Not always. 18 fields
and it might lose it for two or three, but they just....don't appear.

Anyone?

Cutter



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234658
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to