On 8/17/02, Mitko Gerensky-Greene penned: >Hello, > >I am working on a proof of concept site to host a SQL Server >database of songs, titles and lyrics. I have entered the initial set >of data directly into the SQL Server database. Then I created a >master/detail set of pages in CF and tested the pages. The lyrics >have no page breaks and the whole text is running down like a single >paragraph. How can I insert some formatting into a nvarchar field >(Lyrics) so that the lyrics show the way they were intended to, with >paragraph breaks, etc.
Ya know. I went round and round with this forever, and paragraphformat just doesn't get it in some (most) situations. This is what I've found works best, at least for me. ++++ Insert into database: #HTMLEditFormat(replace(myvariable, chr(10), "<br>", "ALL"))# With the one above, if you need to pass the field a 2nd time, for example if you want to preview what you entered before you place it in the database, then click OK or whatnot, you can just put this into the hidden field value that gets passed. Then just enter #myvariable# into the database. This will let you pass values containing quotes from page to page. Otherwise, if you enter something like: This is my description. My name is "Bud". What will get passed is: This is my description. My name is Because when it hits the first quote, it will think that's the end of the form value. ++++ Display on web page: #replace(replace(myvariable, "<", "<", "ALL"), ">", ">", "ALL")# ++++ Display in textarea field (for updating): #replace(replace(replace(myvariable, "<", "<", "ALL"), ">", ">", "ALL"), "<br>", chr(10), "ALL")# -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

