RE: Replace Syntax
Remove the single quotes from form.description. You are treating it as a string rather a variable -Original Message- From: Rick Sanders [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 13, 2007 9:25 AM To: CF-Talk Subject: Replace Syntax Hey list, I'm trying to replace double quotes for single quotes in a string using this syntax: #Replace('form.description','"',"'","ALL")#"> However, it's giving back form.description in the output and not the actual text from the textfield named "description". What am I doing wrong? Rick Sanders Webenergy Canada: 902-401-7689 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293196 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Replace Syntax
#Replace(form.description,'"',"'","ALL")# On Nov 13, 2007 9:25 AM, Rick Sanders <[EMAIL PROTECTED]> wrote: > Hey list, > > > > I'm trying to replace double quotes for single quotes in a string using > this > syntax: > > #Replace('form.description','"',"'","ALL")#"> > > > > However, it's giving back form.description in the output and not the > actual > text from the textfield named "description". > > > > What am I doing wrong? > > > > Rick Sanders > > Webenergy > > Canada: 902-401-7689 > > USA: 919-799-9076 > > Canada: www.webenergy.ca > > USA: www.webenergyusa.com > > > > > > > > ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293197 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Replace Syntax
Sweet! It worked, thanks! Rick Sanders Webenergy Canada: 902-401-7689 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com -Original Message- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: November-13-07 11:02 AM To: CF-Talk Subject: Re: Replace Syntax >>What am I doing wrong? You are actually replacing quotes in the string 'form.description' instead of variable form.description. Just try #Replace(form.description,'"',"'","ALL")# -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293205 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Replace Syntax
replace(form.description not replace('form.description'... form.description is the variable, 'form.description' is a string with the name of the variable. --Ben Doom Rick Sanders wrote: > Hey list, > > > > I'm trying to replace double quotes for single quotes in a string using this > syntax: > > #Replace('form.description','"',"'","ALL")#"> > > > > However, it's giving back form.description in the output and not the actual > text from the textfield named "description". > > > > What am I doing wrong? > > > > Rick Sanders > > Webenergy > > Canada: 902-401-7689 > > USA: 919-799-9076 > > Canada: www.webenergy.ca > > USA: www.webenergyusa.com > > > > > > > > ~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293208 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Replace Syntax
You need the breaking "". Try this: #Replace('form.description','""',"&rsquo","ALL")#"> Robert B. Harrison Director of Interactive services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be &. -Original Message- From: Rick Sanders [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 13, 2007 9:25 AM To: CF-Talk Subject: Replace Syntax Hey list, I'm trying to replace double quotes for single quotes in a string using this syntax: #Replace('form.description','"',"'","ALL")#"> However, it's giving back form.description in the output and not the actual text from the textfield named "description". What am I doing wrong? Rick Sanders Webenergy Canada: 902-401-7689 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293202 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Replace Syntax
>>What am I doing wrong? You are actually replacing quotes in the string 'form.description' instead of variable form.description. Just try #Replace(form.description,'"',"'","ALL")# -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293199 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Replace Syntax
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Rick Sanders [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 13, 2007 9:25 AM To: CF-Talk Subject: Replace Syntax Hey list, I'm trying to replace double quotes for single quotes in a string using this syntax: #Replace('form.description','"',"'","ALL")#"> However, it's giving back form.description in the output and not the actual text from the textfield named "description". What am I doing wrong? Rick Sanders Webenergy Canada: 902-401-7689 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293203 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Replace Syntax
remove the quotes around form.description #Replace(form.description,'"',"'","ALL")# Rick Sanders wrote: > Hey list, > > > > I'm trying to replace double quotes for single quotes in a string using this > syntax: > > #Replace('form.description','"',"'","ALL")#"> > > > > However, it's giving back form.description in the output and not the actual > text from the textfield named "description". > > > > What am I doing wrong? > > > > Rick Sanders > > Webenergy > > Canada: 902-401-7689 > > USA: 919-799-9076 > > Canada: www.webenergy.ca > > USA: www.webenergyusa.com > > > > > > > > ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293206 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Replace Syntax
> #Replace('form.description','"',"'","ALL")#"> Remove the quotes around form.description. Dave Watts, CTO, Fig Leaf Software ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293207 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: replace syntax issue
http://productlocator.site.com/productlocator/resources/9/KEGP/header_02.gif"; width="242" height="75">, "")> You need some quotes around your img string. http://productlocator.site.com/productlocator/resources/9/KEGP/header_02.gif"; width="242" height="75">', "")> -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Soduko | | | - "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| 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:261411 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: replace syntax issue
coldfusion.developer wrote: > Why isn't this working? > > http://www.site.com/StoreLocator/Store_page.txt"; > variable="page_content"> The file attribute of cffile requires a path, not a URL. > src="http://productlocator.site.com/productlocator/resources/9/KEGP/header_ > 02.gif" width="242" height="75">, "")> You need to escape function arguments that are strings. Jochem ~| 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:261414 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: replace syntax issue
If you need to read content from a URL, use cfhttp not cffile. ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 22, 2006 10:36 AM To: CF-Talk Subject: replace syntax issue Why isn't this working? http://www.site.com/StoreLocator/Store_page.txt"; variable="page_content"> http://productlocator.site.com/productlocator/resources/9/KEGP/header_0 2.gif" width="242" height="75">, "")> Error: Missing argument name. When using named parameters to a function, every parameter must have a name. The CFML compiler was processing: an expression beginning with "replace", on line 45, column 1.This message is usually caused by a problem in the expressions structure. a CFSET tag beginning on line 44, column 2. 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:261441 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4