RE: CF Hosting in Europe
Hi Dave, http://onlinebase.nl/ in the Netherlands also does CF-hosting, we're using Railo as our CFML-engine (but also do ACF is needed). For a quote please mail me at sebasti...@onlinebase.nl Greetings from the Netherlands, Sebastiaan Naafs - van Dijk = So long and thanx 4 all the fish == Onlinebase.nl Date: Tue, 15 Jun 2010 02:55:27 +0100 Subject: Re: CF Hosting in Europe From: andy.al...@gmail.com To: cf-talk@houseoffusion.com Centinated (Switzerland) http://www.centinated.ch/en/ Flint Hosts (UK) http://www.flinthosts.com And if you don't care whether they officially support CF or not, Rackspace UK http://www.rackspace.co.uk Andy On 15 June 2010 00:54, Dave Hatz daveh...@hatzventures.org wrote: We have a client that is looking to expand into Switzerland or Germany. Client wants to have his CF application hosted in Europe. Could I get some recommendations on CF Hosting across the pond? Thanks, Dave Hatz ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334566 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
concatenating email address
I'm looking to loop through a query and make a list of these: Daniel Kesslerdan...@umd.edu cfset the_from = '#the_from#,#fname# #lname##email#' However, having the and makes it so that the email address doesn't appear at all. Put in colons instead and it displays the email address fine. However, I want it formatted the way that I display above. How can I do that? I tried concatenating it with symbols, but I had the same result. thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334567 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Finding the value of a key in a nested structure
Cheers Ray - simple is good!! :) On 14 June 2010 17:02, Raymond Camden rcam...@gmail.com wrote: Evaluate is slow - comparatively. It isn't horrible though. The main reason I will complain about evaluate is when it isn't strictly necessary. Technically it isn't in your case. You could break up the string into parts and check the existence of each - but I think your code is fine (and a hell of a lot simpler). On Mon, Jun 14, 2010 at 9:44 AM, Tom King mailingli...@oxalto.co.uk wrote: nevermind - found the solution! ended up with: cffunction name=checkPermission cfargument name=path cfif IsDefined('session.currentUser.permissions.' arguments.path) cfif evaluate('session.currentUser.permissions.' arguments.path) cfreturn true cfelse cfreturn false /cfif cfelse cfreturn false /cfif /cffu ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334568 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: concatenating email address
Problem's not the concatenation, it's just the browser interprets anything between and as tags, so they're hidden by design. Once you have your list, try this: cfoutput#htmlCodeFormat(the_from)#/cfoutput or this: cfoutput#htmlEditFormat(the_from)#/cfoutput From: daniel kessler dani...@umd.edu Sent: Tuesday, June 15, 2010 9:28 AM To: cf-talk cf-talk@houseoffusion.com Subject: concatenating email address I'm looking to loop through a query and make a list of these: Daniel Kesslerdan...@umd.edu cfset the_from = '#the_from#,#fname# #lname##email#' However, having the and makes it so that the email address doesn't appear at all. Put in colons instead and it displays the email address fine. However, I want it formatted the way that I display above. How can I do that? I tried concatenating it with symbols, but I had the same result. thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334569 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: concatenating email address
Problem's not the concatenation, it's just the browser interprets anything between and as tags, so they're hidden by design. Once you have your list, try this: cfoutput#htmlCodeFormat(the_from)#/cfoutput I tried this and the email message failed anyway. It looked great when I did the output to a web page, but on checking the source, it instead had: PREDaniel Kesslerlt;dani...@umd.edugt;/PRE Clearly, I want the actual characters instead of the PRE and lt; ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.comwrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as the last line before the closing /body tag in your page that loads inside dialog. another option is to create a 'listener' that checks if cf richtext area is ready for use, and only then fire your function that populates the form. i don;t have code for this as i have never done it this way, but i think it can be done with setInterval() ... Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334571 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Check for remote CFC call in CF 8
Is there a way, in CF 8, to determine if the current request is calling a CFC that has access=remote? Basically, I'd like to mimic CF 9's onCFCRequest() method, but only for remote methods. I spent a good portion of yesterday afternoon trying to figure out why my jQuery AJAX call would work for me locally, but break on our staging site. All code was identical in every comparison, and both sites were using the same database so the data was identical as well. Long story short, our staging server had CF debugging turned on, and it was appending the debug info to the end of the json being returned from my CFC call, which then threw errors in jQuery. Locally I have debugging going to ColdFire/Firebug, so I never saw the problem. Anyway, a simple cfsetting showdebugoutput=false fixed the issue. So, rather than having to remember to use cfsetting for every remote method, is there a way I can programmatically figure out if the current request is calling a remote method in CF 8? -- Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334572 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: concatenating email address
So in the CF Code, you don't escape the and 's. So: cfset the_from = the_from , fname lnameemail will get you the string to use in your CFMAIL tag, then when you're displaying it via cfoutput, use: #htmlCodeFormat(the_from)# or, to escape the characters, but don't surround with PREs #htmlEditFormat(the_from)# T On 15 June 2010 15:07, daniel kessler dani...@umd.edu wrote: Problem's not the concatenation, it's just the browser interprets anything between and as tags, so they're hidden by design. Once you have your list, try this: cfoutput#htmlCodeFormat(the_from)#/cfoutput I tried this and the email message failed anyway. It looked great when I did the output to a web page, but on checking the source, it instead had: PREDaniel Kesslerlt;dani...@umd.edu kessler%26lt%3bdani...@umd.edu gt;/PRE Clearly, I want the actual characters instead of the PRE and lt; ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334573 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: concatenating email address
cfset the_from = the_from , fname lnameemail ok, so this worked. I swear that I had tried this before I posted, but I probably didn't try and send the email, just viewed it for debugging. In the view, it's going to do the same wrong thing. So it's sending emails fine now. Thank you very much for your assistance. daniel ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334574 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
the textarea element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual textarea element. Azadi On 15/06/2010 22:14, Scott Brady wrote: But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.comwrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as the last line before the closing /body tag in your page that loads inside dialog. another option is to create a 'listener' that checks if cf richtext area is ready for use, and only then fire your function that populates the form. i don;t have code for this as i have never done it this way, but i think it can be done with setInterval() ... Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334575 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Check for remote CFC call in CF 8
specifically for detecting jquery ajax calls to remote cfc functions you can use something like this: cfset headers = getHttpRequestData().headers cfif structKeyExists(headers, X-Requested-With) AND headers[X-Requested-With] eq XMLHttpRequest it's an ajax request using jquery! /cfif more reading: http://www.insideria.com/2009/04/jqueryserver-side-tip-on-detec.html http://blog.pengoworks.com/index.cfm/2009/4/9/ColdFusion-UDF-for-detecting-jQuery-AJAX-operations unfortunately, cf's built-in functions performing ajax requests do not append any headers, so you can't detect those... well, without hacking the cfajax.js file... which is not a very good idea... Azadi On 15/06/2010 22:18, Eric Cobb wrote: Is there a way, in CF 8, to determine if the current request is calling a CFC that has access=remote? Basically, I'd like to mimic CF 9's onCFCRequest() method, but only for remote methods. I spent a good portion of yesterday afternoon trying to figure out why my jQuery AJAX call would work for me locally, but break on our staging site. All code was identical in every comparison, and both sites were using the same database so the data was identical as well. Long story short, our staging server had CF debugging turned on, and it was appending the debug info to the end of the json being returned from my CFC call, which then threw errors in jQuery. Locally I have debugging going to ColdFire/Firebug, so I never saw the problem. Anyway, a simple cfsetting showdebugoutput=false fixed the issue. So, rather than having to remember to use cfsetting for every remote method, is there a way I can programmatically figure out if the current request is calling a remote method in CF 8? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334576 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
Ok, I'm still having issues following this. Your suggestion is to run the function when the page loads (ajaxonload). But, the problem occurs long after the page loads (I can wait 5 minutes after the page is done loading to try it, and I still get the issue). And, putting in an onload handler (either with CF's ajaxonload or using jQuery to append the handler) has it run when the page has loaded -- before I've clicked the edit button that does the ajax request to get the form's values. Maybe I'm not explaining it well enough. The dialog that contains the form is part of the initial page load (i.e., it's a hidden div that, upon the document being loaded, is converted into a jquery dialog. Why would that affect when the ckeditor instance is ready or not? Even if I wait until the dialog is displayed before populating the fields, it throws the error, so it's not just because the dialog is hidden when I try to populate the field. Alternatively, maybe I don't understand what causes the ckeditor to be ready. Scott On Tue, Jun 15, 2010 at 9:05 AM, Azadi Saryev azadi.sar...@gmail.comwrote: the textarea element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual textarea element. Azadi On 15/06/2010 22:14, Scott Brady wrote: But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.com wrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as the last line before the closing /body tag in your page that loads inside dialog. another option is to create a 'listener' that checks if cf richtext area is ready for use, and only then fire your function that populates the form. i don;t have code for this as i have never done it this way, but i think it can be done with setInterval() ... Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334577 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Check for remote CFC call in CF 8
Just to be clear - checking the header works when the library used for calls uses it. It's not 100% correct (but speaking practically, it is safe). On Tue, Jun 15, 2010 at 10:23 AM, Azadi Saryev azadi.sar...@gmail.com wrote: specifically for detecting jquery ajax calls to remote cfc functions you can use something like this: cfset headers = getHttpRequestData().headers cfif structKeyExists(headers, X-Requested-With) AND headers[X-Requested-With] eq XMLHttpRequest it's an ajax request using jquery! /cfif ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334578 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
it was actually me who was misunderstanding things! i have misread your question and assumed that you were loading an external page which contained richtext textarea into a dialog... not that i see what exactly you are doing, i have run some tests, and, as you said, in cf9 the textarea does not get the new value... cf8 does not have this problem and works correctly, though... i will play with it some more and post here. Azadi On 15/06/2010 23:49, Scott Brady wrote: Ok, I'm still having issues following this. Your suggestion is to run the function when the page loads (ajaxonload). But, the problem occurs long after the page loads (I can wait 5 minutes after the page is done loading to try it, and I still get the issue). And, putting in an onload handler (either with CF's ajaxonload or using jQuery to append the handler) has it run when the page has loaded -- before I've clicked the edit button that does the ajax request to get the form's values. Maybe I'm not explaining it well enough. The dialog that contains the form is part of the initial page load (i.e., it's a hidden div that, upon the document being loaded, is converted into a jquery dialog. Why would that affect when the ckeditor instance is ready or not? Even if I wait until the dialog is displayed before populating the fields, it throws the error, so it's not just because the dialog is hidden when I try to populate the field. Alternatively, maybe I don't understand what causes the ckeditor to be ready. Scott On Tue, Jun 15, 2010 at 9:05 AM, Azadi Saryev azadi.sar...@gmail.comwrote: the textarea element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual textarea element. Azadi On 15/06/2010 22:14, Scott Brady wrote: But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.com wrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as the last line before the closing /body tag in your page that loads inside dialog. another option is to create a 'listener' that checks if cf richtext area is ready for use, and only then fire your function that populates the form. i don;t have code for this as i have never done it this way, but i think it can be done with setInterval() ... Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334579 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
Hmmm in that case, I may just go with it. Our dev environments are CF9, but production is CF8. It's on an admin page, so I guess I'll just see what happens and make sure it works. Thanks! Scott On Tue, Jun 15, 2010 at 10:43 AM, Azadi Saryev azadi.sar...@gmail.comwrote: it was actually me who was misunderstanding things! i have misread your question and assumed that you were loading an external page which contained richtext textarea into a dialog... not that i see what exactly you are doing, i have run some tests, and, as you said, in cf9 the textarea does not get the new value... cf8 does not have this problem and works correctly, though... i will play with it some more and post here. Azadi On 15/06/2010 23:49, Scott Brady wrote: Ok, I'm still having issues following this. Your suggestion is to run the function when the page loads (ajaxonload). But, the problem occurs long after the page loads (I can wait 5 minutes after the page is done loading to try it, and I still get the issue). And, putting in an onload handler (either with CF's ajaxonload or using jQuery to append the handler) has it run when the page has loaded -- before I've clicked the edit button that does the ajax request to get the form's values. Maybe I'm not explaining it well enough. The dialog that contains the form is part of the initial page load (i.e., it's a hidden div that, upon the document being loaded, is converted into a jquery dialog. Why would that affect when the ckeditor instance is ready or not? Even if I wait until the dialog is displayed before populating the fields, it throws the error, so it's not just because the dialog is hidden when I try to populate the field. Alternatively, maybe I don't understand what causes the ckeditor to be ready. Scott On Tue, Jun 15, 2010 at 9:05 AM, Azadi Saryev azadi.sar...@gmail.com wrote: the textarea element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual textarea element. Azadi On 15/06/2010 22:14, Scott Brady wrote: But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.com wrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as the last line before the closing /body tag in your page that loads inside dialog. another option is to create a 'listener' that checks if cf richtext area is ready for use, and only then fire your function that populates the form. i don;t have code for this as i have never done it this way, but i think it can be done with setInterval() ... Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334580 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Branching Strategies
Thanks to all who replied to my question. You guys gave me a lot of help and info I will share with the rest of my team to help decide how we set up Subversion. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334581 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
yeah, since cf9 uses newer version of ckeditor, some things have changed... i have seen some rather weird stuff in my tests now with cf9. i guess it has something to do with the textarea being initially hidden, and then displayed when the dialog is displayed. this must be causing some event chain to fire, which happens to make the ckeditor instance associated with the textarea temporarily unavailable. i _think_ that maybe the textarea instance is re-drawn (or maybe even drawn for the first time) only after the dialog is visible (you may have noticed that fckstyles.xml file is requested only after the dialog is shown), and that causes the instance to not be defined for a moment. in any case - if you are still interested - firing the setValue() with a delay of 1000 ms after the dialog is opened seems to solve the problem in cf9: var ta = ColdFusion.RichText.getEditorObject('socialEventDescription'); if (ta) { ColdFusion.RichText.setValue(ta.Name, str); } else { setTimeout(function(){ColdFusion.RichText.setValue(ColdFusion.RichText.getEditorObject('socialEventDescription').Name, responseData.socialEventDescription);}, 1000); } Azadi On 16/06/2010 00:59, Scott Brady wrote: Hmmm in that case, I may just go with it. Our dev environments are CF9, but production is CF8. It's on an admin page, so I guess I'll just see what happens and make sure it works. Thanks! Scott On Tue, Jun 15, 2010 at 10:43 AM, Azadi Saryev azadi.sar...@gmail.comwrote: it was actually me who was misunderstanding things! i have misread your question and assumed that you were loading an external page which contained richtext textarea into a dialog... not that i see what exactly you are doing, i have run some tests, and, as you said, in cf9 the textarea does not get the new value... cf8 does not have this problem and works correctly, though... i will play with it some more and post here. Azadi On 15/06/2010 23:49, Scott Brady wrote: Ok, I'm still having issues following this. Your suggestion is to run the function when the page loads (ajaxonload). But, the problem occurs long after the page loads (I can wait 5 minutes after the page is done loading to try it, and I still get the issue). And, putting in an onload handler (either with CF's ajaxonload or using jQuery to append the handler) has it run when the page has loaded -- before I've clicked the edit button that does the ajax request to get the form's values. Maybe I'm not explaining it well enough. The dialog that contains the form is part of the initial page load (i.e., it's a hidden div that, upon the document being loaded, is converted into a jquery dialog. Why would that affect when the ckeditor instance is ready or not? Even if I wait until the dialog is displayed before populating the fields, it throws the error, so it's not just because the dialog is hidden when I try to populate the field. Alternatively, maybe I don't understand what causes the ckeditor to be ready. Scott On Tue, Jun 15, 2010 at 9:05 AM, Azadi Saryev azadi.sar...@gmail.com wrote: the textarea element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual textarea element. Azadi On 15/06/2010 22:14, Scott Brady wrote: But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.com wrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as the last line before the closing /body tag in your page that loads inside dialog. another option is to create a 'listener' that checks if cf richtext area is ready for use, and only then fire your function that populates the form. i don;t have code for this as i have never done it this way, but i think it can be done with setInterval() ... Azadi ~| Order the Adobe Coldfusion Anthology
Re: cftextarea setValue() and jquery dialog
actually, in your case (cf9 + richtext textarea inside jquery dialog) it is as easy as setting the value of actual textarea element using jquery before the dialog is opened! $(textarea[name='socialEventDescription']).val(responseData.socialEventDescription); $(#dialog).dialog(open); since cf9 re-draws the richtext textarea, it will show the new value in it. however, this will NOT work in cf8... Azadi On 16/06/2010 02:02, Azadi Saryev wrote: yeah, since cf9 uses newer version of ckeditor, some things have changed... i have seen some rather weird stuff in my tests now with cf9. i guess it has something to do with the textarea being initially hidden, and then displayed when the dialog is displayed. this must be causing some event chain to fire, which happens to make the ckeditor instance associated with the textarea temporarily unavailable. i _think_ that maybe the textarea instance is re-drawn (or maybe even drawn for the first time) only after the dialog is visible (you may have noticed that fckstyles.xml file is requested only after the dialog is shown), and that causes the instance to not be defined for a moment. in any case - if you are still interested - firing the setValue() with a delay of 1000 ms after the dialog is opened seems to solve the problem in cf9: var ta = ColdFusion.RichText.getEditorObject('socialEventDescription'); if (ta) { ColdFusion.RichText.setValue(ta.Name, str); } else { setTimeout(function(){ColdFusion.RichText.setValue(ColdFusion.RichText.getEditorObject('socialEventDescription').Name, responseData.socialEventDescription);}, 1000); } Azadi On 16/06/2010 00:59, Scott Brady wrote: Hmmm in that case, I may just go with it. Our dev environments are CF9, but production is CF8. It's on an admin page, so I guess I'll just see what happens and make sure it works. Thanks! Scott On Tue, Jun 15, 2010 at 10:43 AM, Azadi Saryev azadi.sar...@gmail.comwrote: it was actually me who was misunderstanding things! i have misread your question and assumed that you were loading an external page which contained richtext textarea into a dialog... not that i see what exactly you are doing, i have run some tests, and, as you said, in cf9 the textarea does not get the new value... cf8 does not have this problem and works correctly, though... i will play with it some more and post here. Azadi On 15/06/2010 23:49, Scott Brady wrote: Ok, I'm still having issues following this. Your suggestion is to run the function when the page loads (ajaxonload). But, the problem occurs long after the page loads (I can wait 5 minutes after the page is done loading to try it, and I still get the issue). And, putting in an onload handler (either with CF's ajaxonload or using jQuery to append the handler) has it run when the page has loaded -- before I've clicked the edit button that does the ajax request to get the form's values. Maybe I'm not explaining it well enough. The dialog that contains the form is part of the initial page load (i.e., it's a hidden div that, upon the document being loaded, is converted into a jquery dialog. Why would that affect when the ckeditor instance is ready or not? Even if I wait until the dialog is displayed before populating the fields, it throws the error, so it's not just because the dialog is hidden when I try to populate the field. Alternatively, maybe I don't understand what causes the ckeditor to be ready. Scott On Tue, Jun 15, 2010 at 9:05 AM, Azadi Saryev azadi.sar...@gmail.com wrote: the textarea element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual textarea element. Azadi On 15/06/2010 22:14, Scott Brady wrote: But the text area exists on the page already. The empty cftextarea would be available by the time the page loads (and the div isn't made a dialog until after the page loads). The whole form exists when the page loads. The ajax is just to get data for populating the form field values themselves. So, I don't think that's the issue, unless I'm misunderstanding you. Scott On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev azadi.sar...@gmail.com wrote: On 15/06/2010 10:25, Scott Brady wrote: The success function then populates the form (including the text area) i assume you are talking about $.ajax() [or similar] jquery success callback? that one will fire before the cf's richtext area is fully ready, thus your error. what you can do, is move the success callback into a separate named function (if you have it defined in-line in success: property of $.ajax()), and then call it using ajaxonload() cf function by putting cfset ajaxonload('function-name-here') as
Re: cftextarea setValue() and jquery dialog
Thanks! I'll try that. On Tue, Jun 15, 2010 at 12:02 PM, Azadi Saryev azadi.sar...@gmail.comwrote: yeah, since cf9 uses newer version of ckeditor, some things have changed... i have seen some rather weird stuff in my tests now with cf9. i guess it has something to do with the textarea being initially hidden, and then displayed when the dialog is displayed. this must be causing some event chain to fire, which happens to make the ckeditor instance associated with the textarea temporarily unavailable. i _think_ that maybe the textarea instance is re-drawn (or maybe even drawn for the first time) only after the dialog is visible (you may have noticed that fckstyles.xml file is requested only after the dialog is shown), and that causes the instance to not be defined for a moment. in any case - if you are still interested - firing the setValue() with a delay of 1000 ms after the dialog is opened seems to solve the problem in cf9: var ta = ColdFusion.RichText.getEditorObject('socialEventDescription'); if (ta) { ColdFusion.RichText.setValue(ta.Name, str); } else { setTimeout(function(){ColdFusion.RichText.setValue(ColdFusion.RichText.getEditorObject('socialEventDescription').Name, responseData.socialEventDescription);}, 1000); } Azadi -- - Scott Brady http://www.scottbrady.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334584 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
...and the winner is (works in both cf8 and cf9): var ta = $(#f1 textarea[name='socialEventDescription']); ColdFusion.RichText.setValue(ta.attr('id'), responseData.socialEventDescription); ta.val(responseData.socialEventDescription); $(#dialog).dialog(open); hth Azadi On 16/06/2010 02:22, Scott Brady wrote: Thanks! I'll try that. On Tue, Jun 15, 2010 at 12:02 PM, Azadi Saryev azadi.sar...@gmail.comwrote: yeah, since cf9 uses newer version of ckeditor, some things have changed... i have seen some rather weird stuff in my tests now with cf9. i guess it has something to do with the textarea being initially hidden, and then displayed when the dialog is displayed. this must be causing some event chain to fire, which happens to make the ckeditor instance associated with the textarea temporarily unavailable. i _think_ that maybe the textarea instance is re-drawn (or maybe even drawn for the first time) only after the dialog is visible (you may have noticed that fckstyles.xml file is requested only after the dialog is shown), and that causes the instance to not be defined for a moment. in any case - if you are still interested - firing the setValue() with a delay of 1000 ms after the dialog is opened seems to solve the problem in cf9: var ta = ColdFusion.RichText.getEditorObject('socialEventDescription'); if (ta) { ColdFusion.RichText.setValue(ta.Name, str); } else { setTimeout(function(){ColdFusion.RichText.setValue(ColdFusion.RichText.getEditorObject('socialEventDescription').Name, responseData.socialEventDescription);}, 1000); } Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334585 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cftextarea setValue() and jquery dialog
nope, the winner is this list and the cf community at large by your great contribution. Thank you On Tue, Jun 15, 2010 at 2:28 PM, Azadi Saryev azadi.sar...@gmail.com wrote: ...and the winner is (works in both cf8 and cf9): var ta = $(#f1 textarea[name='socialEventDescription']); ColdFusion.RichText.setValue(ta.attr('id'), responseData.socialEventDescription); ta.val(responseData.socialEventDescription); $(#dialog).dialog(open); hth Azadi On 16/06/2010 02:22, Scott Brady wrote: Thanks! I'll try that. On Tue, Jun 15, 2010 at 12:02 PM, Azadi Saryev azadi.sar...@gmail.comwrote: yeah, since cf9 uses newer version of ckeditor, some things have changed... i have seen some rather weird stuff in my tests now with cf9. i guess it has something to do with the textarea being initially hidden, and then displayed when the dialog is displayed. this must be causing some event chain to fire, which happens to make the ckeditor instance associated with the textarea temporarily unavailable. i _think_ that maybe the textarea instance is re-drawn (or maybe even drawn for the first time) only after the dialog is visible (you may have noticed that fckstyles.xml file is requested only after the dialog is shown), and that causes the instance to not be defined for a moment. in any case - if you are still interested - firing the setValue() with a delay of 1000 ms after the dialog is opened seems to solve the problem in cf9: var ta = ColdFusion.RichText.getEditorObject('socialEventDescription'); if (ta) { ColdFusion.RichText.setValue(ta.Name, str); } else { setTimeout(function(){ColdFusion.RichText.setValue(ColdFusion.RichText.getEditorObject('socialEventDescription').Name, responseData.socialEventDescription);}, 1000); } Azadi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334586 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
error with paypal api
I am trying to stay away from the deprecated parameters in the paypal api call to method SetExpressCheckout. I am getting this error with the wall: Order total is missing. L_ERRORCODE0=10400 But I am passing PAYMENTREQUEST_0_AMT which should replace AMT(deprecated). If I add AMT, the call goes through, but when I continue to paypal, I don't get any item details. cffunction access=public name=set_express_checkout output=no returntype=struct cfargument name=app_user_id type=numeric required=yes cfargument name=live_or_sandbox required=yes type=string cfargument name=add_insurance required=yes type=string cfobject component=redhotkittiescfcs.qry name=qry / cfset qry_paypallock_get = qry.qry_paypallock_get( app_user_id=#arguments.app_user_id#) / cfobject component=redhotkittiescfcs.paypal name=paypal cfset paypal_enviroment = structnew() cfset paypal_enviroment = paypal.select_enviroment( live_or_sandbox = #arguments.live_or_sandbox# ) / cfset variables.shipping_cost = 5.00 cfif arguments.add_insurance cfset variables.insuranceamt = 2.00 cfelse cfset variables.insuranceamt = 0 /cfif cfhttp method=get url=#paypal_enviroment.api_url# throwonerror=yes cfhttpparam type=url name=user value=#paypal_enviroment.api_user# cfhttpparam type=url name=pwd value=#paypal_enviroment.api_pwd# cfhttpparam type=url name=signature value=#paypal_enviroment.api_signature# cfhttpparam type=url name=returnurl value=#paypal_enviroment.return_url# cfhttpparam type=url name=cancelurl value=#paypal_enviroment.cancel_url# cfhttpparam type=url name=method value=SetExpressCheckout cfhttpparam type=url name=PAYMENTREQUEST_0_PAYMENTACTION value=Sale cfhttpparam type=url name=PAYMENTREQUEST_0_CURRENCYCODE value=USD cfhttpparam type=url name=allownote value=1 cfhttpparam type=url name=version value=60.0 cfhttpparam type=url name=noshipping value=2 cfhttpparam type=url name=PAYMENTREQUEST_0_SHIPPINGAMT value=#numberformat( variables.shipping_cost, .99 )# cfif arguments.add_insurance cfhttpparam type=url name=PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED value=true cfhttpparam type=url name=PAYMENTREQUEST_0_INSURANCEAMT value=#numberformat( variables.insuranceamt, .99 )# /cfif cfset variables.item_total = 0 cfloop query=qry_paypallock_get cfset variables.item_total = variables.item_total + ( qry_paypallock_get.unitprice * qry_paypallock_get.quantity ) cfset variables.paypal_item_row = qry_paypallock_get.currentrow - 1 cfhttpparam type=url name=L_PAYMENTREQUEST_0_NAME#variables.paypal_item_row# value=# qry_paypallock_get.name# cfhttpparam type=url name=L_PAYMENTREQUEST_0_NUMBER#variables.paypal_item_row# value=#qry_paypallock_get.tblproductsfk# cfhttpparam type=url name=L_PAYMENTREQUEST_0_DESC#variables.paypal_item_row# value=#qry_paypallock_get.shortdescription# cfhttpparam type=url name=L_PAYMENTREQUEST_0_AMT#variables.paypal_item_row# value=#numberformat(qry_paypallock_get.unitprice, .99 )# cfhttpparam type=url name=L_PAYMENTREQUEST_0_QTY#variables.paypal_item_row# value=#qry_paypallock_get.quantity# /cfloop cfhttpparam type=url name=PAYMENTREQUEST_0_ITEMAMT value=#numberformat( variables.item_total, .99 )# cfset variables.order_total = variables.item_total + variables.shipping_cost + variables.insuranceamt cfhttpparam type=url name=PAYMENTREQUEST_0_AMT value=#numberformat( variables.order_total, .99 )# /cfhttp cfset variables.response_code = paypal.save_express_checkout( api_response=#cfhttp.FileContent# ) !--- this portion adds the required vars for paypal link creation --- cfset variables.response_code.amt = numberformat( variables.order_total, .99 ) cfset variables.response_code.currency_code = USD cfset variables.response_code.return_url = paypal_enviroment.return_url cfset variables.response_code.cancel_url = paypal_enviroment.cancel_url cfreturn variables.response_code /cffunction ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334587 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Going nuts with a query
I have the following code Insert into Accounting_Temp ( Id ,EnrollmentNumber ,EnrollmentChannel ,StatusName ,Status ,PromoCode ,QualificationType ,CreationDate ,LastModified ,State ,ZipCode ,UnqualifiedReason ) Values ( cfloop index=data list=#i# delimiters=XX cfswitch expression=#count# cfcase value=1 '#data#' /cfcase cfcase value=2 , #data# /cfcase cfcase value=3 , '#data#' /cfcase cfcase value=4 , '#data#' /cfcase cfcase value=5 , #data# /cfcase cfcase value=6 , '#data#' /cfcase cfcase value=7 , '#data#' /cfcase cfcase value=8 cfset DBDate = #CREATEODBCDATETIME(data)# , #DBDate# /cfcase cfcase value=9 cfset DBDate = #CREATEODBCDATETIME(data)# , #DBDate# /cfcase cfcase value=10 , '#data#' /cfcase cfcase value=11 , '#data#' /cfcase cfcase value=12 cfif data is 'N/A' cfset LongReasonFlag = 0 , '#data#' cfelse cfset LongReasonFlag = 1 , '#data# /cfif /cfcase cfcase value=13 #data# /cfcase cfcase value=14 #data# /cfcase cfcase value=15 #data# /cfcase /cfswitch cfset count=#count#+1 /cfloop cfif LongReasonFlag EQ 0 ) cfelse ') /cfif That I want to take the following data
Re: Going nuts with a query
Replace... cfset newcsvfile = replace(newcsvfile, '', '', ALL) with cfset newcsvfile = replace(newcsvfile, '', ',', ALL) You are missing your delimiter on that string. You could also replace your double quotations with some other character you wont see in your csv file, like ~ and add it to your delimeters list in your loop. Jim Eisenhauer On Tue, Jun 15, 2010 at 2:17 PM, Phillip Vector vec...@mostdeadlygame.comwrote: I have the following code Insert into Accounting_Temp ( Id ,EnrollmentNumber ,EnrollmentChannel ,StatusName ,Status ,PromoCode ,QualificationType ,CreationDate ,LastModified ,State ,ZipCode ,UnqualifiedReason ) Values ( cfloop index=data list=#i# delimiters=XX cfswitch expression=#count# cfcase value=1 '#data#' /cfcase cfcase value=2 , #data# /cfcase cfcase value=3 , '#data#' /cfcase cfcase value=4 , '#data#' /cfcase cfcase value=5 , #data# /cfcase cfcase value=6 , '#data#' /cfcase cfcase value=7 , '#data#' /cfcase cfcase value=8 cfset DBDate = #CREATEODBCDATETIME(data)# , #DBDate# /cfcase cfcase value=9 cfset DBDate = #CREATEODBCDATETIME(data)# , #DBDate# /cfcase cfcase value=10 , '#data#' /cfcase cfcase value=11 , '#data#' /cfcase cfcase value=12 cfif data is 'N/A' cfset LongReasonFlag = 0 , '#data#' cfelse cfset LongReasonFlag = 1 , '#data# /cfif /cfcase cfcase value=13 #data# /cfcase cfcase value=14 #data# /cfcase cfcase value=15 #data# /cfcase /cfswitch
Re: Going nuts with a query
Replace... cfset newcsvfile = replace(newcsvfile, '', '', ALL) with cfset newcsvfile = replace(newcsvfile, '', ',', ALL) You are missing your delimiter on that string. You could also replace your double quotations with some other character you wont see in your csv file, like ~ and add it to your delimeters list in your loop. Jim Eisenhauer ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334590 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm