Now, Charlie...no need to be so "snippy". :o) Just because I have complaints that JS isn't like CF in some ways, doesn't mean I don't want to grow in my understanding and application of JS.
Anyway, your method is a lot more code, and may be slower than using the replace in the JS. I just wanted to see how it performed. Now, I think it's about bedtime for someone.... ;o) Rick On Sun, Apr 19, 2009 at 7:22 PM, Charlie Griefer <charlie.grie...@gmail.com>wrote: > > On Sun, Apr 19, 2009 at 3:58 PM, Rick Faircloth > <r...@whitestonemedia.com> wrote: > > That worked, Ricardo...to a point. > > (Haven't tried your solution, Charlie...) > > > > I actually just embedded the replace function in the code like this: > > > > out.push('<div id="sectionTextDIV">' + row[4].replace(/\r?\n/, '<br/>') + > > '</div>'); > > > > and that worked, but only for the first line break in the text. > > > > I tried adding 'all', like I do when I use the replace function in CFML, > > but it had no effect. > > > > ...'<br/>', 'all') + '</div>'); > > > > Suggestions? > > Sure. I suggest you return the data in the format that you need it to be > in. > > You've complained in the past that JS isn't like CF. Here's a place > where you can play to your strengths and manipulate the string prior > to returning it from the remote CFC call. > > -- > I have failed as much as I have succeeded. But I love my life. I love > my wife. And I wish you my kind of success. > > -- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- "It has been my experience that most bad government is the result of too much government." - Thomas Jefferson