Ask a Question related to Macromedia ColdFusion, Design and Development.
-
tommarius #1
newline to <br>?
When doing a databse query, how do yu contvert your newlines to <br>?
tommarius Guest
-
adding newline in xml export
I'm using ID CS on win2k and I'm wondering how to add new lines after xml elements that I'm creating. It's saving the whole export on one line. TIA -
Newline in XML
Hello Is there any way to insert new line charcter in an Attribute of XML and let flash read it dinamicaly? Something like this XML-Code ... -
newline problem
I just installed php 4.3 on windows xp. It seems that new lines are ignored. The following code <?php for ($i=0; $i<10; $i++){ print "test"; }... -
prevent newline in datagrid
Hello Newsgroup! I have a DataGrid. In the cells of this DataGrid are strings displayed which consists of more then one word. When the collum of... -
newline
How can i make a newline in a sprite of a text-member with lingo? THX Wolfgang -
Stressed_Simon #2
Re: newline to <br>?
Well I find it best to add the <br /> tags when I add them to the database.
That way I can output them in HTML with out any additional formatting. I only
need to remove them if I want to make them editable in a form.
To accomplish this I do as follows.
<!--- this is a new line --->
<cfset CrLf = Chr(13) & Chr(10)>
<!--- add br tags --->
<cfset Result = Trim(Replace(FORM.TextBox, CrLf, "<br />", "ALL"))>
You can just do the reverse to take them out.
<!--- strip out <br /> tags --->
<cfset Result = Trim(Replace(DatabaseValue, "<br />", CrLf, "ALL"))>
If you wist to continue as you have then you will have to experiment as to how
your database stores line breaks. Some use Chr(10) and some use Chr(10)
followed by Chr(12).
Stressed_Simon Guest



Reply With Quote

