Line breaks being lost in textarea form field
I don't know if this specifically a CF question so sorry if it is considered OT. I have an admin section of the site that lets the owner add and edit items/products. I am having an issue with the description field where the newline/enter key input is being lost when editing an entry. To give more detail, we have a product description saved in the db like so: This is product description1. This is paragraph 2. This is paragraph 3 I am using the tag ParagraphFormat2.cfm from cflib and the output is working fine on the product page. However, when the owner goes to edit the item, and the description is pulled from the db, it appears like this: This is product description1.This is paragraph 2.This is paragraph 3 After saving the item the text now appers on the product page without any paragraph breaks as a single paragraph. So if the owner wants to make any edits to the item they have to reformat the description re-adding the paragraph breaks. I tried adding htmleditformat() with no luck. Here is the tag: tdtextarea name=productDescription rows=10 cols=39#htmleditformat(attributes.itemForm.productDescription)#/textarea/td Any ideas? I would really appreciate it. Thank you. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360225 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Line breaks being lost in textarea form field
I would view the source to see if the subsequent form edit has line breaks. If not this would indicate the data is not being saved as it was entered. You could also copy and paste the data out of the database into notepad or something, to see how the data is actually being stored. On Mar 8, 2015 1:52 PM, Mark Spence markpence...@gmail.com wrote: I don't know if this specifically a CF question so sorry if it is considered OT. I have an admin section of the site that lets the owner add and edit items/products. I am having an issue with the description field where the newline/enter key input is being lost when editing an entry. To give more detail, we have a product description saved in the db like so: This is product description1. This is paragraph 2. This is paragraph 3 I am using the tag ParagraphFormat2.cfm from cflib and the output is working fine on the product page. However, when the owner goes to edit the item, and the description is pulled from the db, it appears like this: This is product description1.This is paragraph 2.This is paragraph 3 After saving the item the text now appers on the product page without any paragraph breaks as a single paragraph. So if the owner wants to make any edits to the item they have to reformat the description re-adding the paragraph breaks. I tried adding htmleditformat() with no luck. Here is the tag: tdtextarea name=productDescription rows=10 cols=39#htmleditformat(attributes.itemForm.productDescription)#/textarea/td Any ideas? I would really appreciate it. Thank you. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360228 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
John, Yes, I did. It works well for black circle bullets. The problem is with the white circle bullets and square bullets. Thanks -Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357054 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
Dan, The hex code works for the black circle bullet, but not for the white bullet. Here is what I found and worked around to do the job. I found that white bullet from word document is not a bullet; it is a small letter 'o' I put a letter 'o' and the code for tab together. It works! Here is javascript: str.replace(/\o\t/g, . ); -Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357055 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
John, I did use Replace function, but circle and square bullets still do not work. I tried all the following number codes chr(8220),chr(8221),chr(8226),chr(2022),chr(25E6),chr(9702),chr(2043),chr(9675),chr(9702),chr(9642),chr(9643),chr(9632),chr(9633) Thanks Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357051 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
Did you use http://cflib.org/udf/convertSpecialChars On Nov 5, 2013 3:07 PM, Joy Paulose kalappura...@hotmail.com wrote: John, I did use Replace function, but circle and square bullets still do not work. I tried all the following number codes chr(8220),chr(8221),chr(8226),chr(2022),chr(25E6),chr(9702),chr(2043),chr(9675),chr(9702),chr(9642),chr(9643),chr(9632),chr(9633) Thanks Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357052 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
You'd need to convert the hexidecimal numbers to standard decimal numbers. The chr() does not work with hexidecimal values. -Dan On Tuesday, November 5, 2013, Joy Paulose wrote: John, I did use Replace function, but circle and square bullets still do not work. I tried all the following number codes chr(8220),chr(8221),chr(8226),chr(2022),chr(25E6),chr(9702),chr(2043),chr(9675),chr(9702),chr(9642),chr(9643),chr(9632),chr(9633) Thanks Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357053 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Removing bullets from textarea
Hi, I want to remove bullets and other strange characters from textarea. if the user enters the text by copying and pasting from Word, it does not display properly. On submission, the bullets and the double quotes basically turn into a ? (question mark). Did anyone ever find a solution for this? Thanks Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357025 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
Run the entry through a REReplace and only allow characters you want in there. On Mon, Nov 4, 2013 at 1:08 PM, Joy Paulose kalappura...@hotmail.comwrote: Hi, I want to remove bullets and other strange characters from textarea. if the user enters the text by copying and pasting from Word, it does not display properly. On submission, the bullets and the double quotes basically turn into a ? (question mark). Did anyone ever find a solution for this? Thanks Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357026 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
http://cflib.org/udf/convertSpecialChars On Mon, Nov 4, 2013 at 4:08 PM, Joy Paulose kalappura...@hotmail.comwrote: Hi, I want to remove bullets and other strange characters from textarea. if the user enters the text by copying and pasting from Word, it does not display properly. On submission, the bullets and the double quotes basically turn into a ? (question mark). Did anyone ever find a solution for this? Thanks Joy ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357027 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Formating text within textarea
The problem seems to combining the text with HTMLEditFormat to display the contents and other HTML characters, such as 'ndash;' in the text that was added by the editor toolbar. How do I strip those out, without knowing what other types may be added by the users? Ideally, there should be a way of displaying HTML contents in a textarea to solve my problem, or am I missing something? Try chr(13) or even a combination of both chr(13) chr(10) I am using a toolbar editor to save text from a textarea into a table. When I display the text in the same textarea, I get br / chars for paragraphs. Using ReReplace br / with chr(10) doesn't work. Could someone tell me how to display new paragraphs within a textarea, please? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309133 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Formating text within textarea
Display correction: other HTML characters, such as '\ndash;' ( + ndash).. The problem seems to combining the text with HTMLEditFormat to display the contents and other HTML characters, such as 'ndash;' in the text that was added by the editor toolbar. How do I strip those out, without knowing what other types may be added by the users? Ideally, there should be a way of displaying HTML contents in a textarea to solve my problem, or am I missing something? Try chr(13) or even a combination of both chr(13) chr(10) I am using a toolbar editor to save text from a textarea into a table. When I display the text in the same textarea, I get br / chars for paragraphs. Using ReReplace br / with chr(10) doesn't work. Could someone tell me how to display new paragraphs within a textarea, please? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309139 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Formating text within textarea
I am using a toolbar editor to save text from a textarea into a table. When I display the text in the same textarea, I get br / chars for paragraphs. Using ReReplace br / with chr(10) doesn't work. Could someone tell me how to display new paragraphs within a textarea, please? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309073 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Formating text within textarea
Try chr(13) or even a combination of both chr(13) chr(10) -Original Message- From: Kamru Miah [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 10:43 AM To: CF-Talk Subject: Formating text within textarea I am using a toolbar editor to save text from a textarea into a table. When I display the text in the same textarea, I get br / chars for paragraphs. Using ReReplace br / with chr(10) doesn't work. Could someone tell me how to display new paragraphs within a textarea, please? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309121 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Form.fieldnames for textarea
I am building binamic survey . SO when i inserti g the value of the radio buttons all works, but when i am trying to get the id of the textarea it does not . I do not know what to do next CFLOOP LIST=#Form.fieldnames# Index=field cfif #field# neq btnSubmitSurvey cfquery name=qryInsert1 datasource=cfelsunrise dbtype=odbc insert into SurveyResultsDetail (answer,surveyID,idfk) values (cfif ListContains(evaluate(field), txt)#ListLast(evaluate(field), _)#cfelse #ListLast(Evaluate(Form.#field#), _)#/cfif,#url.survey#,#result#) /cfquery /cfif /CFLOOP ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304951 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Limit content in Textarea?
Without JS there's nothing you can do on the client. Make it clear there is a limit and send them back if they break the limit and let them know how much they were out by. Adrian Lynch -Original Message- From: Steve LaBadie Sent: 12 December 2007 19:24 To: CF-Talk Subject: SOT: Limit content in Textarea? I am using JavaScript to limit the amount of text on can submit in the textarea. Realizing disabling JavaScript may allow people to enter more than 300 characters in the textarea field. Does anyone have any suggestions or thoughts? JavaScript: script type=text/javascript function textCounter(field, countfield, maxlimit) { if (field.value.length maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } /script textarea name=problemDesc wrap=physical cols=50 rows=8 onKeyDown=textCounter(this.form.problemDesc,this.form.remLen,300); onKeyUp=textCounter(this.form.problemDesc,this.form.remLen,300); class=formveld/textarea Steve LaBadie, Web Manager ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294669 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SOT: Limit content in Textarea?
I am using JavaScript to limit the amount of text on can submit in the textarea. Realizing disabling JavaScript may allow people to enter more than 300 characters in the textarea field. Does anyone have any suggestions or thoughts? JavaScript: script type=text/javascript function textCounter(field, countfield, maxlimit) { if (field.value.length maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } /script textarea name=problemDesc wrap=physical cols=50 rows=8 onKeyDown=textCounter(this.form.problemDesc,this.form.remLen,300); onKeyUp=textCounter(this.form.problemDesc,this.form.remLen,300); class=formveld/textarea Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.esu.edu http://www.esu.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294631 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SOT: Limit content in Textarea?
Server side validation.check the length before inserting dataif it's too long...tell the user Cheers Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com Notice: This message, including any attachments, is confidential and may contain information that is privileged or exempt from disclosure. It is intended only for the person to whom it is addressed unless expressly authorized otherwise by the sender. If you are not an authorized recipient, please notify the sender immediately and permanently destroy all copies of this message and attachments. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294635 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SOT: Limit content in Textarea?
Just add a CFML check to the processing page: CFIF Len(FORM.MyTextArea) GT 300 You entered more then 300 characters into the text area.br CFEXIT /CFIF Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ BlueDragon Alliance Member [EMAIL PROTECTED] Steve LaBadie wrote: I am using JavaScript to limit the amount of text on can submit in the textarea. Realizing disabling JavaScript may allow people to enter more than 300 characters in the textarea field. Does anyone have any suggestions or thoughts? JavaScript: script type=text/javascript function textCounter(field, countfield, maxlimit) { if (field.value.length maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } /script textarea name=problemDesc wrap=physical cols=50 rows=8 onKeyDown=textCounter(this.form.problemDesc,this.form.remLen,300); onKeyUp=textCounter(this.form.problemDesc,this.form.remLen,300); class=formveld/textarea Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.esu.edu http://www.esu.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294634 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SOT: Limit content in Textarea?
Does anyone have any suggestions or thoughts? Yup, always do the validation on the server as well. JavaScript and other client side validation is for the user interface -- to make it nice for the person entering the data. Server side validation is for the application -- to protect the data. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294636 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Textarea that uploads images from Word docs behind the scenes.
Someone mentioned that there was a textarea field that did this. Anyone remember the name? I can't find it on the list. Or more likely I'm not searching for the right terms. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258750 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Textarea that uploads images from Word docs behind the scenes.
I think What you mean is there is a WYSIWYG editor out there that can do that. FCK and SoEditor have the functionality to allow you to upload images, but I don't beleieve either actually lets you upload the image in the text area... I think they both have you use an upload utility and then the image gets added to the text you are editing. google fck editor and you will see some examples. -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258752 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Textarea that uploads images from Word docs behind the scenes.
Xstandard does this I am pretty sure. www.xstandard.com -or- http://www.bennadel.com/blog/tags/15-XStandard-WYSIWYG-blog-entries.htm .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 01, 2006 5:02 PM To: CF-Talk Subject: Textarea that uploads images from Word docs behind the scenes. Someone mentioned that there was a textarea field that did this. Anyone remember the name? I can't find it on the list. Or more likely I'm not searching for the right terms. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258753 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Single or Double Quotes - textarea values
When I insert or update using the cfquery tag, some of the form fields has a long text string that is being palced into a text data type. Sometimes the text from the textarea contains single quotations or commas. This seems to throwing off my SQL statement. Should I be wrapping this form's values in double single quotes or or double quotes instead of single quotes. UPDATE tbl_HumanResourcesJobs SET pr_title = 'Job Description', pr_text = 'You'll be responsible for implementing, all of the responsibilities of ', pr_active = Yes, pr_date = 'September 29, 02006', pr_department = 'Marketing' WHERE hr_id = 97 ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255997 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Single or Double Quotes - textarea values
Just use CFQueryParam... Problem solved. .. Ben Nadel Certified Advanced ColdFusion Developer www.bennadel.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 09, 2006 12:53 PM To: CF-Talk Subject: Single or Double Quotes - textarea values When I insert or update using the cfquery tag, some of the form fields has a long text string that is being palced into a text data type. Sometimes the text from the textarea contains single quotations or commas. This seems to throwing off my SQL statement. Should I be wrapping this form's values in double single quotes or or double quotes instead of single quotes. UPDATE tbl_HumanResourcesJobs SET pr_title = 'Job Description', pr_text = 'You'll be responsible for implementing, all of the responsibilities of ', pr_active = Yes, pr_date = 'September 29, 02006', pr_department = 'Marketing' WHERE hr_id = 97 ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255998 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Single or Double Quotes - textarea values
You can use pr_text = cfqueryparam value=You'll be responsible for implementing, all of the responsibilities of cfsqltype=CF_SQL_VARCHAR or cfsqltype=CF_SQL_CHAR, depending on your data type on the field 'pr_text hth Charlie Hanlon Web Applications Developer Food Service Enablers, Inc. www.fsenablers.com The People. The Platform. The Products. Make the Difference - Original Message - From: [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, October 09, 2006 12:53 PM Subject: Single or Double Quotes - textarea values When I insert or update using the cfquery tag, some of the form fields has a long text string that is being palced into a text data type. Sometimes the text from the textarea contains single quotations or commas. This seems to throwing off my SQL statement. Should I be wrapping this form's values in double single quotes or or double quotes instead of single quotes. UPDATE tbl_HumanResourcesJobs SET pr_title = 'Job Description', pr_text = 'You'll be responsible for implementing, all of the responsibilities of ', pr_active = Yes, pr_date = 'September 29, 02006', pr_department = 'Marketing' WHERE hr_id = 97 ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256000 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
OT: CR in a textarea problem
Hi list, I have the following in a textarea (form): name1 name2 name3 and I want to output the values of the field exaxtly the same like: name1 name2 name3 not like: name1 name2 name3 How can I catch the CR after every line ? Uwe ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251142 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: OT: CR in a textarea problem
Use pre ? On 8/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi list, I have the following in a textarea (form): name1 name2 name3 and I want to output the values of the field exaxtly the same like: name1 name2 name3 not like: name1 name2 name3 How can I catch the CR after every line ? Uwe ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251143 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: OT: CR in a textarea problem
replace(form.value, chr(13)chr(10), br /, all) On 8/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi list, I have the following in a textarea (form): name1 name2 name3 and I want to output the values of the field exaxtly the same like: name1 name2 name3 not like: name1 name2 name3 How can I catch the CR after every line ? Uwe ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251144 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CR in a textarea problem
htmlCodeFormat() From: [EMAIL PROTECTED] and I want to output the values of the field exaxtly the same like: ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251145 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: OT: CR in a textarea problem
#replacenocase(form.fieldtxtarea,chr(10),br /)# Cheers, Kris and I want to output the values of the field exaxtly the same like: name1 name2 name3 not like: name1 name2 name3 How can I catch the CR after every line ? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251146 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CR in a textarea problem
That IS how they will go into the database. You just have to make sure to format it that way when outputting it since browsers dont parse CRs as line breaks. So just insert the... Name1 Name2 Name3 Then when you output it replace the CRs with br / tags like so... #Replace(query.column, #chr(13)##chr(10)#, br /, all)# or just wrap it in pre tags ;-) ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, August 26, 2006 12:15 PM To: CF-Talk Subject: OT: CR in a textarea problem Hi list, I have the following in a textarea (form): name1 name2 name3 and I want to output the values of the field exaxtly the same like: name1 name2 name3 not like: name1 name2 name3 How can I catch the CR after every line ? Uwe ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251147 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CR in a textarea problem
On 8/26/06, Mike Tangorre [EMAIL PROTECTED] wrote: htmlCodeFormat() Oh yeah. Bobby's right though, it's stored how it's stored. Generally speaking, you want it to go in how you want it to come out. :D ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251165 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: OT: CR in a textarea problem
Unfortunately, Paragraphformat will turn a single line break into 2 ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Denny Valliant [mailto:[EMAIL PROTECTED] Sent: Saturday, August 26, 2006 8:13 PM To: CF-Talk Subject: Re: OT: CR in a textarea problem paragraphFormat(form.fieldtxtarea) ? On 8/26/06, Kris Jones [EMAIL PROTECTED] wrote: #replacenocase(form.fieldtxtarea,chr(10),br /)# Cheers, Kris and I want to output the values of the field exaxtly the same like: name1 name2 name3 not like: name1 name2 name3 How can I catch the CR after every line ? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251168 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Eliminating Textarea Whitespaces on UDF retuned values
I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244485 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
Re: Eliminating Textarea Whitespaces on UDF retuned values
It could be chr(160) - the literal character for the non-breaking space (nbsp;). Trimming won't cut it out. Instead, try a replace on it. replace(myString,chr(160),,ALL) -nathan strutz http://www.dopefly.com/ On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244488 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
Re: Eliminating Textarea Whitespaces on UDF retuned values
You could also try using a regex to strip \s*: REReplaceNoCase ( textAreaString, '^\s*', '' ) -- Rob Wilkerson On 6/21/06, Nathan Strutz [EMAIL PROTECTED] wrote: It could be chr(160) - the literal character for the non-breaking space (nbsp;). Trimming won't cut it out. Instead, try a replace on it. replace(myString,chr(160),,ALL) -nathan strutz http://www.dopefly.com/ On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244496 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Eliminating Textarea Whitespaces on UDF retuned values
Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what at least one of those characters might be: asc ( left ( myString, 1 ) ) If it's not a whitespace character, you may have to try something like: REReplace ( myString, '^[\s\xdd]*', '' ) Where, in this case the dd in the character class represents the hexadecimal value of the non-printing character. On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244497 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
RE: Eliminating Textarea Whitespaces on UDF retuned values
Thanks Rob Nathan. Actually I was able to come-up with a work-around. The workaround is to put the value inside a local variable outside of the textarea. This does not create whitespaces: cfset foovar = methodname(number) textarea#foovar#/textarea However, this creates the whitespaces: textarea#methodname(number)#/textarea Now its just basically understanding what triggers one over the other. Hmmm. Again many Thanks!! -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 4:52 PM To: CF-Talk Subject: Re: Eliminating Textarea Whitespaces on UDF retuned values Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what at least one of those characters might be: asc ( left ( myString, 1 ) ) If it's not a whitespace character, you may have to try something like: REReplace ( myString, '^[\s\xdd]*', '' ) Where, in this case the dd in the character class represents the hexadecimal value of the non-printing character. On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244498 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Eliminating Textarea Whitespaces on UDF retuned values
That is strange. Is that the true code where the spaces occur? It would make sense to me if the actual code was something like textarea #methodName ( number )# /textarea But your sample code is so compacted that I wonder where the whitespace is coming from... On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: Thanks Rob Nathan. Actually I was able to come-up with a work-around. The workaround is to put the value inside a local variable outside of the textarea. This does not create whitespaces: cfset foovar = methodname(number) textarea#foovar#/textarea However, this creates the whitespaces: textarea#methodname(number)#/textarea Now its just basically understanding what triggers one over the other. Hmmm. Again many Thanks!! -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 4:52 PM To: CF-Talk Subject: Re: Eliminating Textarea Whitespaces on UDF retuned values Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what at least one of those characters might be: asc ( left ( myString, 1 ) ) If it's not a whitespace character, you may have to try something like: REReplace ( myString, '^[\s\xdd]*', '' ) Where, in this case the dd in the character class represents the hexadecimal value of the non-printing character. On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244499 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Eliminating Textarea Whitespaces on UDF retuned values
Yes, it is actually textarea#methodname(number)#/textarea So there is definitely something in cffunction that is literally being seen within the textarea. -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 5:12 PM To: CF-Talk Subject: Re: Eliminating Textarea Whitespaces on UDF retuned values That is strange. Is that the true code where the spaces occur? It would make sense to me if the actual code was something like textarea #methodName ( number )# /textarea But your sample code is so compacted that I wonder where the whitespace is coming from... On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: Thanks Rob Nathan. Actually I was able to come-up with a work-around. The workaround is to put the value inside a local variable outside of the textarea. This does not create whitespaces: cfset foovar = methodname(number) textarea#foovar#/textarea However, this creates the whitespaces: textarea#methodname(number)#/textarea Now its just basically understanding what triggers one over the other. Hmmm. Again many Thanks!! -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 4:52 PM To: CF-Talk Subject: Re: Eliminating Textarea Whitespaces on UDF retuned values Sorry, I probably should have been more specific. The \s should strip any representation of standard whitespace. Other non-printing characters will not be stripped. You might want to try using the asc() function to see what at least one of those characters might be: asc ( left ( myString, 1 ) ) If it's not a whitespace character, you may have to try something like: REReplace ( myString, '^[\s\xdd]*', '' ) Where, in this case the dd in the character class represents the hexadecimal value of the non-printing character. On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: I'm currently using a UDF that returns a simple alpha-num value. When used inside a form textarea, the value generates several leading whitespace chars. Wrapping it in trim() doesn't work. Any suggestions? Thank you. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244500 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
Re: Eliminating Textarea Whitespaces on UDF retuned values
Did you specify output=false for your function? Could be that simple... :D On 6/21/06, Michael E. Carluen [EMAIL PROTECTED] wrote: Thanks Rob Nathan. Actually I was able to come-up with a work-around. The workaround is to put the value inside a local variable outside of the textarea. This does not create whitespaces: cfset foovar = methodname(number) textarea#foovar#/textarea However, this creates the whitespaces: textarea#methodname(number)#/textarea Now its just basically understanding what triggers one over the other. Hmmm. Again many Thanks!! ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244504 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfinsert and pasted crap in a textarea
Bashing Microsoft is so fun! I doubt I'll ever grow tired of it. Amen brotha! ~Dave the disruptor~ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241720 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
Re: cfinsert and pasted crap in a textarea
Ben, In your experience, have you found any reason not to do this for every insert and update? Steve Les, What I do is at the top of every page processing, I loop through the FORM scope to strip out special MS word characters, or replace them. Soemthing like this (part of my EscapeForm() UDF): ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241724 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
Re: cfinsert and pasted crap in a textarea
On 5/28/06, Les Mizzell [EMAIL PROTECTED] wrote: Denny Valliant wrote: One of the nice features of FCKEditor is the paste from Word, I forgot to mention - they're copying and pasting from a FileMaker Pro database on a Mac. Gawd only knows where the original material came from before it was in Filemaker... I keep telling them - it's two damn sentences! You can type them in from scratch almost faster than you can cut and paste! But, this is a *lazy* client that complained about having to enter any new data at all to start with - but refused to pay me to do any data-entry for them. Jezz, shut up and type it yourself!! Heh Sheesh, usually people are happy to be able to update/edit their data themselves. Last I heard, the Shoe Elves got out of the pro bono work. ;-) ** Regular expressions work pretty good, when I need to limit stuff, but that's usually for filenames and such vs. text. So... YRMV. ** +1 for MS generated stuff being crap. 10K of data, 2MB of formatting. :-) Frankly, I'm surprised any non MS tool can do anything with it. :-P~ Bashing Microsoft is so fun! I doubt I'll ever grow tired of it. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241706 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
Re: cfinsert and pasted crap in a textarea
One of the nice features of FCKEditor is the paste from Word, which seems to work pretty good. I don't do it too often but it seems hunky- dory when I've tried it. I don't think the UTF-8 will work, but don't know for sure. :D Client has decided to cut 'n paste from various sources though, and when they paste and save, it *might* look OK in their browser, but a direct examination of the record shows the dreaded little boxes that come from the MS Word version (amoung other things) of quotes... ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241694 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
Re: cfinsert and pasted crap in a textarea
I love that Paste from word feature - it will autaomtically strip out all that mso- stuff, all the styles and a lot of the duplicate and empty tags. But i havent been able to figure out how come sometimes it wraps the content in p tags, other times in div And why sometimes it removes font tags, other times it doesnt. Does anyone know what's going on there? Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 5/29/06, Denny Valliant [EMAIL PROTECTED] wrote: One of the nice features of FCKEditor is the paste from Word, which seems to work pretty good. I don't do it too often but it seems hunky- dory when I've tried it. I don't think the UTF-8 will work, but don't know for sure. :D ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241696 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
Re: cfinsert and pasted crap in a textarea
Does anyone know what's going on there? Ii think thats the motto at ms meetings... I have found that word cleanup doesnt always work either, why cant ms just use the damn normal chars? ~Dave the disruptor~ From: Mike Kear [EMAIL PROTECTED] Sent: Sunday, May 28, 2006 11:15 PM To: CF-Talk cf-talk@houseoffusion.com Subject: Re: cfinsert and pasted crap in a textarea I love that Paste from word feature - it will autaomtically strip out all that But i havent been able to figure out how come sometimes it wraps the content in tags, other times in And why sometimes it removes tags, other times it doesnt. Does anyone know what's going on there? Cheers Mike Kear Windsor, NSW, Australia Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On 5/29/06, Denny Valliant wrote: One of the nice features of FCKEditor is the paste from Word, which seems to work pretty good. I don't do it too often but it seems hunky- dory when I've tried it. I don't think the UTF-8 will work, but don't know for sure. :D ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241697 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
Re: cfinsert and pasted crap in a textarea
Denny Valliant wrote: One of the nice features of FCKEditor is the paste from Word, which seems to work pretty good. I use FCKEditor on a few sites, and TinyMCE (?is that correct?) on a few others. I've thought about using it for the textarea in question - but it does seem like overkill for the single two or three sentence paragraph that's going to be entered. I'd also have to turn off *all* features, as the only thing that's supposed to be in there is plain text, and as soon as the client thinks they can format something, they'll go nutz... ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241698 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
Re: cfinsert and pasted crap in a textarea
Denny Valliant wrote: One of the nice features of FCKEditor is the paste from Word, I forgot to mention - they're copying and pasting from a FileMaker Pro database on a Mac. Gawd only knows where the original material came from before it was in Filemaker... I keep telling them - it's two damn sentences! You can type them in from scratch almost faster than you can cut and paste! But, this is a *lazy* client that complained about having to enter any new data at all to start with - but refused to pay me to do any data-entry for them. Jezz, shut up and type it yourself!! Heh ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241699 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfinsert and pasted crap in a textarea
WOT but I noticed Flex 2 beta 3 has a fairly good rich text editor that could probably do with an update like image uploading for starters. While CFMX7 flash forms are useful - the Flex/CF support will rock my world. PT www.actcfug.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241700 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
RE: Textarea width
See that's what I get for working on stuff about 15 hours straight. The obvious is overlooked. At first I was trying cols=* but I guess That only worked for TDs a long time ago. -Original Message- From: Tony [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 11:08 PM To: CF-Talk Subject: Re: Textarea width well... close but: form textarea style=width:100%; name=foo rows=12/textarea /form but you prolly knew that. tw On 5/24/06, Marty Johll [EMAIL PROTECTED] wrote: form textarea style=width=100%; name=foo rows=12/textarea /form Marty On 5/24/06, Coldfusion [EMAIL PROTECTED] wrote: Is there a way to specify a textarea field's columns to be 100% or the field size? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241437 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cfinsert and pasted crap in a textarea
Using cfinsert to add a record from an admin form. There's a text area for a description and as long as you type directly into it, no problem. You can put any darned thing in there you want. Client has decided to cut 'n paste from various sources though, and when they paste and save, it *might* look OK in their browser, but a direct examination of the record shows the dreaded little boxes that come from the MS Word version (amoung other things) of quotes... What's the best way of solving this problem? Do I need to quit using cfinsert in this instance and go with a regular cfquery and htmleditformat? Or is there a better way? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241530 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfinsert and pasted crap in a textarea
they paste and save, it *might* look OK in their browser, but a direct examination of the record shows the dreaded little boxes that come from the MS Word version (amoung other things) of quotes... Whoop - this is a mySQL database, by the way. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241531 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
RE: cfinsert and pasted crap in a textarea
Les, What I do is at the top of every page processing, I loop through the FORM scope to strip out special MS word characters, or replace them. Soemthing like this (part of my EscapeForm() UDF): for (LOCAL.Key in FORM){ // Trim the field value. ARGUMENTS.Form[ LOCAL.Key ] = Trim(ARGUMENTS.Form[ LOCAL.Key ]); // Since we want to store regular quotes in the database, lets make // sure we don't have any escaped quotes in the submitted values. ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], quot;, Chr(34), ALL); // We don't want to store lame-ass Micorosoft characters since they // never display correctly on the screen cross-browser. Replace the // special characters that Microsoft uses. ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], Chr(8217), Chr(39), ALL); ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], Chr(8216), Chr(39), ALL); ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], Chr(8220), Chr(34), ALL); ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], Chr(8221), Chr(34), ALL); ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], Chr(8211), -, ALL); ARGUMENTS.Form[ LOCAL.Key ] = Replace(ARGUMENTS.Form[ LOCAL.Key ], Chr(8212), -, ALL); } The 8000+ char values are MS Word quotes and apostrophes and dashes. ... Ben Nadel www.bennadel.com -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 8:06 PM To: CF-Talk Subject: cfinsert and pasted crap in a textarea Using cfinsert to add a record from an admin form. There's a text area for a description and as long as you type directly into it, no problem. You can put any darned thing in there you want. Client has decided to cut 'n paste from various sources though, and when they paste and save, it *might* look OK in their browser, but a direct examination of the record shows the dreaded little boxes that come from the MS Word version (amoung other things) of quotes... What's the best way of solving this problem? Do I need to quit using cfinsert in this instance and go with a regular cfquery and htmleditformat? Or is there a better way? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241532 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
Re: cfinsert and pasted crap in a textarea
a few tags on cflib that do this but I have yet to find one that completely work. No good solution but not to do it, worse case show them how to paste it into notepad first then into site. ~Dave the disruptor~ From: Les Mizzell [EMAIL PROTECTED] Sent: Thursday, May 25, 2006 8:22 PM To: CF-Talk cf-talk@houseoffusion.com Subject: Re: cfinsert and pasted crap in a textarea they paste and save, it *might* look OK in their browser, but a direct examination of the record shows the dreaded little boxes that come from the MS Word version (amoung other things) of quotes... Whoop - this is a mySQL database, by the way. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241533 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
Re: cfinsert and pasted crap in a textarea
dave wrote: a few tags on cflib that do this but I have yet to find one that completely work. No good solution but not to do it, worse case show them how to paste it into notepad first then into site. Heh - fat chance. This client is screaming bloody murder about the time it takes just to enter a single record (Maybe 5 minutes per record - but they HATE computers, so that's an eternity for them!) But - what about changing the encoding of the database field itself to UTF-8? What would that do? I haven't tried it yet... ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241534 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
Textarea width
Is there a way to specify a textarea field's columns to be 100% or the field size? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241397 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
Re: Textarea width
form textarea style=width=100%; name=foo rows=12/textarea /form Marty On 5/24/06, Coldfusion [EMAIL PROTECTED] wrote: Is there a way to specify a textarea field's columns to be 100% or the field size? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241399 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
Re: Textarea width
well... close but: form textarea style=width:100%; name=foo rows=12/textarea /form but you prolly knew that. tw On 5/24/06, Marty Johll [EMAIL PROTECTED] wrote: form textarea style=width=100%; name=foo rows=12/textarea /form Marty On 5/24/06, Coldfusion [EMAIL PROTECTED] wrote: Is there a way to specify a textarea field's columns to be 100% or the field size? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241404 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: TextArea for multi inputs
Just treat the resulting form.variable as a list using CHR(13) and CHR(10) as delimiters. -Original Message- From: j s [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 11:44 AM To: CF-Talk Subject: TextArea for multi inputs Does anyone know how to use a textarea as a multi input field? F.e. I'v seen a form which uses a textarea to insert mulitple email addresses each separated by the carriage return. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237763 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: TextArea for multi inputs
When processing, just treat the form value as a list with chr(13) and chr(10) as its delimiters. cfset emailAddys = listToArray ( form.fieldName, '#chr(13)##chr(10)#' ) / On 4/14/06, j s [EMAIL PROTECTED] wrote: Does anyone know how to use a textarea as a multi input field? F.e. I'v seen a form which uses a textarea to insert mulitple email addresses each separated by the carriage return. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237767 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: TextArea for multi inputs
j s wrote: Does anyone know how to use a textarea as a multi input field? F.e. I'v seen a form which uses a textarea to insert mulitple email addresses each separated by the carriage return. On your processing page, you can use something like the following: CFSET variables.CrLf = Chr(13) Chr(10) CFLOOP list=#Form.MyTextArea# delimiters=#variables.CrLf# index=i #i#br !--- Additional processing can go here... --- /CFLOOP Hope that helps! -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Blue Dragon Alliance Member [EMAIL PROTECTED] ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237769 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
TextArea for multi inputs
I want to use a textarea form feild to insert multiple values. f.e. I've seen it used to insert muliple email addresses seperated by a carriage return. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237785 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
RE: TextArea for multi inputs
On the action page you treat the form field's output (form[whatever] or form.whatever) as a list using CRLF as the list delimiter. -- Timothy Heald Analyst, Architect, Developer [EMAIL PROTECTED] W: 202-228-8372 C: 703-300-3911 -Original Message- From: j s [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 11:44 AM To: CF-Talk Subject: TextArea for multi inputs Does anyone know how to use a textarea as a multi input field? F.e. I'v seen a form which uses a textarea to insert mulitple email addresses each separated by the carriage return. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237788 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
Spell Checking a Textarea
Hi, Does anyone know or have an example of how to call Microsoft Word's Spell Checker thru VBScript. My users would like a me to add a textbox on a page with the spellcheck button that opens up Words Spell Checker. I have seen this done on ASPX pages but not on a CFM page. I know that there are editors (for textareas) that include spell checkers but they would like to use Word since it already has the companies dictionary added to it. Thanks Mario == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232198 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Spell Checking a Textarea
You should be able to use the examples you have seen with ASPX, as the vbscript you are using will be client side...so the backend shouldn't really matter. And, as I'm sure you know, this will be IE only, and only if the security settings in IE allow it. On 2/14/06, Ciliotta, Mario [EMAIL PROTECTED] wrote: Hi, Does anyone know or have an example of how to call Microsoft Word's Spell Checker thru VBScript. My users would like a me to add a textbox on a page with the spellcheck button that opens up Words Spell Checker. I have seen this done on ASPX pages but not on a CFM page. I know that there are editors (for textareas) that include spell checkers but they would like to use Word since it already has the companies dictionary added to it. Thanks Mario == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232226 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
OT: Formatting textarea
Hi all Sorry for OT. I am inserting a textarea into a database and when I retrieve the data I would like to show that same user formats with breaks, returns and so on. But only show inline text without formatting. Using HTMLEditFormat, ParagraphFormat, Replace(UserInputText,chr(13),br,all) and so on don't work... What's happened? Thanx MD ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212356 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
Re: OT: Formatting textarea
Use a PRE tag around it. cheers, barneyb On 7/20/05, Michel Deloux [EMAIL PROTECTED] wrote: Hi all Sorry for OT. I am inserting a textarea into a database and when I retrieve the data I would like to show that same user formats with breaks, returns and so on. But only show inline text without formatting. Using HTMLEditFormat, ParagraphFormat, Replace(UserInputText,chr(13),br,all) and so on don't work... What's happened? Thanx MD -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212357 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Convert Textarea to List?
Keep in mind that the return differs from system to system. It could be Chr(13)Chr(10), but also chr(10) or even Chr(13). An alternative would be CommaSeperatedList = ListChangeDelims(form.myList,,,chr(10) chr(13)) This would work, no matter what system you are on. Pascal -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 18:03 To: CF-Talk Subject: RE: Convert Textarea to List? cfset CommaSeperatedList = replace(form.myList, chr(13), ,, All) Just replace form.myList with the correct form field name. Should work Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.com ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185421 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
RE: Convert Textarea to List?
Addendum - Don't forget that if there's a comma in one of the rows in the form field e.g. Green eggs, ham then you would get green eggs as one list item and ham as another.. Best to remove all commas in the form field first or replace them with something like a semicolon. So you would get Green eggs; ham,Biscuits,Orange Juice cfset form.myList = replace(form.myList, ,, ;, All) cfset CommaSeperatedList = replace(form.myList, chr(13), ,, All) :) Martin -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 17:03 To: CF-Talk Subject: RE: Convert Textarea to List? cfset CommaSeperatedList = replace(form.myList, chr(13), ,, All) Just replace form.myList with the correct form field name. Should work Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.com -Original Message- From: Bob Haroche [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 17:05 To: CF-Talk Subject: Convert Textarea to List? My form has a textarea in which a user can input multiple values, one per line, eg: Green eggs and ham Biscuits Orange juice On form submission, the value of form.textarea is a string Green eggs and ham Biscuits Orange juice I want to convert the above to a comma delimited list, eg: Green eggs and ham, Biscuits, Orange juice I've been trying to use REReplace to replace new line returns with commas - unsuccessfully. Replacing spaces isn't working either because lines 1 and 3 have spaces in them but should each be considered a single list item. I know this is done all the time, just not by me. Advice? Thanks. - Regards, Bob Haroche O n P o i n t S o l u t i o n s www.OnPointSolutions.com ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185407 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Convert Textarea to List?
Outstanding, so simple too. Thanks. - Regards, Bob Haroche O n P o i n t S o l u t i o n s www.OnPointSolutions.com ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185408 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Convert Textarea to List?
My form has a textarea in which a user can input multiple values, one per line, eg: Green eggs and ham Biscuits Orange juice On form submission, the value of form.textarea is a string Green eggs and ham Biscuits Orange juice I want to convert the above to a comma delimited list, eg: Green eggs and ham, Biscuits, Orange juice I've been trying to use REReplace to replace new line returns with commas - unsuccessfully. Replacing spaces isn't working either because lines 1 and 3 have spaces in them but should each be considered a single list item. I know this is done all the time, just not by me. Advice? Thanks. - Regards, Bob Haroche O n P o i n t S o l u t i o n s www.OnPointSolutions.com ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185405 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Convert Textarea to List?
Simple when you've done it a few thousand times ;) Glad it helped Martin ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185410 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
RE: Convert Textarea to List?
cfset CommaSeperatedList = replace(form.myList, chr(13), ,, All) Just replace form.myList with the correct form field name. Should work Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.com -Original Message- From: Bob Haroche [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 17:05 To: CF-Talk Subject: Convert Textarea to List? My form has a textarea in which a user can input multiple values, one per line, eg: Green eggs and ham Biscuits Orange juice On form submission, the value of form.textarea is a string Green eggs and ham Biscuits Orange juice I want to convert the above to a comma delimited list, eg: Green eggs and ham, Biscuits, Orange juice I've been trying to use REReplace to replace new line returns with commas - unsuccessfully. Replacing spaces isn't working either because lines 1 and 3 have spaces in them but should each be considered a single list item. I know this is done all the time, just not by me. Advice? Thanks. - Regards, Bob Haroche O n P o i n t S o l u t i o n s www.OnPointSolutions.com ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185406 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Problem with Quotation Marks in Textarea Formfield
When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183743 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem with Quotation Marks in Textarea Formfield
HTMLEditFormat() On Tue, 9 Nov 2004 11:29:31 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183748 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem with Quotation Marks in Textarea Formfield
use function preservceinglequotes if you are inserting those values in a DB On Tue, 9 Nov 2004 11:29:31 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183749 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
RE: Problem with Quotation Marks in Textarea Formfield
I believe his issue is double quotes not single. for instance. input type=text name=name value=some textand some more The quote in the middle of the value will cause a problem. I am not positive but have you tried HTMLEditFormat or URLDecode? Cant remember exactly and I cant test anything at the moment. David -Original Message- From: Qasim Rasheed [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:40 AM To: CF-Talk Subject: Re: Problem with Quotation Marks in Textarea Formfield use function preservceinglequotes if you are inserting those values in a DB On Tue, 9 Nov 2004 11:29:31 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183754 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
RE: Problem with Quotation Marks in Textarea Formfield
sorry I meant URLEncodeFormat not URLDecode -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:52 AM To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield I believe his issue is double quotes not single. for instance. input type=text name=name value=some textand some more The quote in the middle of the value will cause a problem. I am not positive but have you tried HTMLEditFormat or URLDecode? Cant remember exactly and I cant test anything at the moment. David -Original Message- From: Qasim Rasheed [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:40 AM To: CF-Talk Subject: Re: Problem with Quotation Marks in Textarea Formfield use function preservceinglequotes if you are inserting those values in a DB On Tue, 9 Nov 2004 11:29:31 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183755 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
RE: Problem with Quotation Marks in Textarea Formfield
HTMLEditFormat() Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 17:30 To: CF-Talk Subject: Problem with Quotation Marks in Textarea Formfield When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183757 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Problem with Quotation Marks in Textarea Formfield
Thanks for all the input everyone... HTMLEditFormat() is helpingbut... Before adding that code, my statement was #Replace(Application.Article.Body, #Chr(13)#, br, All)# to create paragraphs... Now with HTMLEditFormat() added, I've got: #HTMLEditFormat(Replace(Application.Article.Body, #Chr(13)#, br, All))# This code solves the quote issue, and leaves my paragraphs intact, but not I've got br showing up in the text. Does using HTMLEditFormat() make Replace() unnecessary? Or how should the code be changed? Thanks, Rick -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:56 AM To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield HTMLEditFormat() Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 17:30 To: CF-Talk Subject: Problem with Quotation Marks in Textarea Formfield When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~ | Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183757 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=708.628.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54 -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183766 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem with Quotation Marks in Textarea Formfield
I'm stabbing in the dark here, but I think you need to remove from around br ??? Help from CF'ers with more experience out there??? ~ Donna On Tue, 9 Nov 2004 12:39:36 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: Thanks for all the input everyone... HTMLEditFormat() is helpingbut... Before adding that code, my statement was #Replace(Application.Article.Body, #Chr(13)#, br, All)# to create paragraphs... Now with HTMLEditFormat() added, I've got: #HTMLEditFormat(Replace(Application.Article.Body, #Chr(13)#, br, All))# This code solves the quote issue, and leaves my paragraphs intact, but not I've got br showing up in the text. Does using HTMLEditFormat() make Replace() unnecessary? Or how should the code be changed? Thanks, Rick -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:56 AM To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield HTMLEditFormat() Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 17:30 To: CF-Talk Subject: Problem with Quotation Marks in Textarea Formfield When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~ | Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183757 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=708.628.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54 -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183768 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
Re: Problem with Quotation Marks in Textarea Formfield
use HTMLEditFormat() for displaying the data in the text area only, not for inserting into the DB. Use cfqueryparam for DB insert/updates to automagically escape stuffs. Doug On Tue, 9 Nov 2004 12:39:36 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: Thanks for all the input everyone... HTMLEditFormat() is helpingbut... Before adding that code, my statement was #Replace(Application.Article.Body, #Chr(13)#, br, All)# to create paragraphs... Now with HTMLEditFormat() added, I've got: #HTMLEditFormat(Replace(Application.Article.Body, #Chr(13)#, br, All))# This code solves the quote issue, and leaves my paragraphs intact, but not I've got br showing up in the text. Does using HTMLEditFormat() make Replace() unnecessary? Or how should the code be changed? Thanks, Rick -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:56 AM To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield HTMLEditFormat() Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 17:30 To: CF-Talk Subject: Problem with Quotation Marks in Textarea Formfield When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~ | Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183757 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=708.628.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54 -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183769 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
RE: Problem with Quotation Marks in Textarea Formfield
The problem is that HTMLEditFormat is stripping CR/LF. Look at http://www.cflib.org/udf.cfm?ID=664 Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 18:40 To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield Thanks for all the input everyone... HTMLEditFormat() is helpingbut... Before adding that code, my statement was #Replace(Application.Article.Body, #Chr(13)#, br, All)# to create paragraphs... Now with HTMLEditFormat() added, I've got: #HTMLEditFormat(Replace(Application.Article.Body, #Chr(13)#, br, All))# This code solves the quote issue, and leaves my paragraphs intact, but not I've got br showing up in the text. Does using HTMLEditFormat() make Replace() unnecessary? Or how should the code be changed? Thanks, Rick -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:56 AM To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield HTMLEditFormat() Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 17:30 To: CF-Talk Subject: Problem with Quotation Marks in Textarea Formfield When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~ | Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183757 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=708.628.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54 -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183770 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem with Quotation Marks in Textarea Formfield
you don't need br's in the textarea output. use your replace() function when you are displaying the data back to the user. On Tue, 9 Nov 2004 12:46:06 -0500, Douglas Knudsen [EMAIL PROTECTED] wrote: use HTMLEditFormat() for displaying the data in the text area only, not for inserting into the DB. Use cfqueryparam for DB insert/updates to automagically escape stuffs. Doug On Tue, 9 Nov 2004 12:39:36 -0500, Rick Faircloth [EMAIL PROTECTED] wrote: Thanks for all the input everyone... HTMLEditFormat() is helpingbut... Before adding that code, my statement was #Replace(Application.Article.Body, #Chr(13)#, br, All)# to create paragraphs... Now with HTMLEditFormat() added, I've got: #HTMLEditFormat(Replace(Application.Article.Body, #Chr(13)#, br, All))# This code solves the quote issue, and leaves my paragraphs intact, but not I've got br showing up in the text. Does using HTMLEditFormat() make Replace() unnecessary? Or how should the code be changed? Thanks, Rick -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 11:56 AM To: CF-Talk Subject: RE: Problem with Quotation Marks in Textarea Formfield HTMLEditFormat() Pascal -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: 09 November 2004 17:30 To: CF-Talk Subject: Problem with Quotation Marks in Textarea Formfield When a user puts in Quotation Marks in a Textarea formfield the text gets cut off starting with the first quote... How can I avoid this? (I search the HOF archives but didn't find anything helpful...) Thanks, Rick -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~ | Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183757 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=708.628.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54 -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.280 / Virus Database: 265.1.0 - Release Date: 11/9/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183771 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
RE: formatting in textarea
When you insert the value as is in a memo field it whould retain the carriage return.. If you show the value of the memo field in a textarea you should see the carriage return.. The replace solution is to show the value as text in html not in a textarea.. But carriage return are preserve as is when you insert the value in a text or memo field Pat -Original Message- From: Roberto Perez [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 03:15 To: CF-Talk Subject: RE: formatting in textarea At 06:16 PM 11/6/04, Pat wrote: Just do this : cfset locCarriageReturn=chr(13) chr(10) cfoutput #replace(your_variable,locCarriageReturn,BR,ALL)# /cfoutput Thanks for the several solutions proposed. However, here's my doubt: if the text in the Memo field in Access is being stored without carriage returns, that means that whatever code or tags I use would have to be employed as data is *sent* to the database, so that carriage returns are included in that text. Can any of these solutions (e.g., locCarriageReturn, ParagraphFormat, etc.) be used *before* the data is stored (i.e., as data is sent), so that carriage returns are preserved? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183570 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
Re: formatting in textarea
One other imprtant thing I've run into when using replace for this purpose is this: When you display the memo field in an edit form, those br's show up. I usually use another replace() when outputting to an edit form. Something like: Replace(string,br, ,ALL) It seems to work well. THE GAME! ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183571 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
NO, don't modify the text before it goes into the database filling it with html tags. Leave it exactly as they typed it. Only format it with the replace() when displaying it in html. It will show up exactly as it was in a textarea. If you do it like you're saying, all of the text will run together when you display it in a textarea and all the carriage returns would be lost on the first update since all of your line breaks get replaced with a space. -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Sunday, November 07, 2004 9:21 AM To: CF-Talk Subject: Re: formatting in textarea One other imprtant thing I've run into when using replace for this purpose is this: When you display the memo field in an edit form, those br's show up. I usually use another replace() when outputting to an edit form. Something like: Replace(string,br, ,ALL) It seems to work well. THE GAME! ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183575 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
formatting in textarea
Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183562 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
RE: formatting in textarea
When you display the text, using ColdFusion, you need to replace the line feeds with br tags. There may be a custom tag or UDF that already does this since it is such a common issue. M!ke -Original Message- From: Roberto Perez [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 11:10 PM To: CF-Talk Subject: formatting in textarea Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183563 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
RE: formatting in textarea
Just do this : cfset locCarriageReturn=chr(13) chr(10) cfoutput #replace(your_variable,locCarriageReturn,BR,ALL)# /cfoutput Pat -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: November 6, 2004 18:02 To: CF-Talk Subject: RE: formatting in textarea When you display the text, using ColdFusion, you need to replace the line feeds with br tags. There may be a custom tag or UDF that already does this since it is such a common issue. M!ke -Original Message- From: Roberto Perez [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 11:10 PM To: CF-Talk Subject: formatting in textarea Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183564 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: formatting in textarea
Roberto Perez wrote: Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? The ParagraphFormat() function might be what you're looking for. -- Keith Gaughan, Developer Digital Crew Ltd., Pembroke House, Pembroke Street, Cork, Ireland http://digital-crew.com/ ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183565 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=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
At 06:16 PM 11/6/04, Pat wrote: Just do this : cfset locCarriageReturn=chr(13) chr(10) cfoutput #replace(your_variable,locCarriageReturn,BR,ALL)# /cfoutput Thanks for the several solutions proposed. However, here's my doubt: if the text in the Memo field in Access is being stored without carriage returns, that means that whatever code or tags I use would have to be employed as data is *sent* to the database, so that carriage returns are included in that text. Can any of these solutions (e.g., locCarriageReturn, ParagraphFormat, etc.) be used *before* the data is stored (i.e., as data is sent), so that carriage returns are preserved? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183566 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
RE: formatting in textarea
I try not to use paragraphformat() too much. Users usually end up complaining that their single line breaks become doubles. I usually input the text from a textarea just as they entered and then format it on output with #replace(str, #chr(13)##chr(10)#, br, ALL)# -Original Message- From: Keith Gaughan [mailto:[EMAIL PROTECTED] Sent: Saturday, November 06, 2004 7:06 PM To: CF-Talk Subject: Re: formatting in textarea Roberto Perez wrote: Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? The ParagraphFormat() function might be what you're looking for. -- Keith Gaughan, Developer Digital Crew Ltd., Pembroke House, Pembroke Street, Cork, Ireland http://digital-crew.com/ ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183567 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
textarea looping
ok, so i have been doing only admin stuff this last year...don't have my books with me and am having a completely brain fart friday... i need to get a list from a textarea so i can loop over it and ensure the directories exist, ie: the textarea values come back as a long string with spaces between them if the user entered them as a list (one dir on each line), but if i try to loop over them cfloop just sees it as one item, not a list, even if i tell it to use space as a delimiter... help. brain not working today...should know this. steph [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: textarea looping
It may look like a space between them in HTML (debugging output?), but is it really a line feed or carriage return/line feed? If so, try using chr(13) and chr(10) as list delimiters. Jerry Johnson [EMAIL PROTECTED] 10/01/04 02:35PM ok, so i have been doing only admin stuff this last year...don't have my books with me and am having a completely brain fart friday... i need to get a list from a textarea so i can loop over it and ensure the directories exist, ie: the textarea values come back as a long string with spaces between them if the user entered them as a list (one dir on each line), but if i try to loop over them cfloop just sees it as one item, not a list, even if i tell it to use space as a delimiter... help. brain not working today...should know this. steph [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: textarea looping
Um, if they're entering them one per line, the delimiter would be a linebreak character, not a space.Try using 10 and 13 as delimiters, and make sure to trim(). --Ben Stephenie Hamilton wrote: ok, so i have been doing only admin stuff this last year...don't have my books with me and am having a completely brain fart friday... i need to get a list from a textarea so i can loop over it and ensure the directories exist, ie: the textarea values come back as a long string with spaces between them if the user entered them as a list (one dir on each line), but if i try to loop over them cfloop just sees it as one item, not a list, even if i tell it to use space as a delimiter... help. brain not working today...should know this. steph [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: textarea looping
duh!! thanks ben, you da man. steph Um, if they're entering them one per line, the delimiter would be a linebreak character, not a space.Try using 10 and 13 as delimiters, and make sure to trim(). --Ben Stephenie Hamilton wrote: [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: textarea looping
thanks [embarrased grin] steph It may look like a space between them in HTML (debugging output?), but is it really a line feed or carriage return/line feed? If so, try using chr(13) and chr(10) as list delimiters. Jerry Johnson [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]