RE: Ajax Post Value on CF Side
Solved. The problem was I was overcomplicating this and treating it like JSON just like everyone else has been advising. With an AJAX post, the string: Object {name: "rid", value: "1"} Appears to Coldfusion as form values. The values #form.name# and #form.value# give me "rid" and "1". Too simple, so it confused me. Robert Harrison Full Stack Developer AIMG rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 www.aimg.com ~| 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:360421 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax Post Value on CF Side
Once you convert it into a CF structure using deserializeJSON, you can then use cfdump to see how CF interprets it. On Tue, Apr 7, 2015 at 12:31 PM Robert Harrison wrote: > > Let me make this simpler. The value being send via an ajax post is: > > Object {name: "rid", value: "1"} > > If I just want to dump that value/object how to I do it? I have no idea > what name CF see that as. > > Robert Harrison > Full Stack Developer > AIMG > rharri...@aimg.com > Main Office: 704-321-1234 ext.118 > Direct Line: 516-302-4345 > www.aimg.com > > > > ~| 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:360420 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Ajax Post Value on CF Side
Let me make this simpler. The value being send via an ajax post is: Object {name: "rid", value: "1"} If I just want to dump that value/object how to I do it? I have no idea what name CF see that as. Robert Harrison Full Stack Developer AIMG rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 www.aimg.com ~| 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:360419 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax Post Value on CF Side
You can very easily convert it to a structure using the deserializeJSON function in CF. Here is a link with some examples of working with JSON in ColdFusion. http://www.learncfinaweek.com/week1/JSON/ On Tue, Apr 7, 2015 at 11:55 AM Robert Harrison wrote: > > I'm sending an Ajax post to a CF page. The post data looks like (below) in > the counsel: > > > > Object {name: "rid", value: "1"} > > > > How in the heck to I get that value on the ColdFusion page? > > > > > > Robert Harrison > Full Stack Developer > AIMG > <mailto:rharri...@aimg.com> rharri...@aimg.com > Main Office: 704-321-1234 ext.118 > Direct Line: 516-302-4345 > <http://www.aimg.com/> www.aimg.com > > > > > > > > > > ~| 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:360418 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax Post Value on CF Side
With JQuery: var post_data = $('#myform').serializeArray(); $.post('/mycfpage',post_data,function(data){ //do stuff with JSON data here var name = data.name; var value = data.value; //then manipulate the DOM from there },'json'); On April 7, 2015 at 11:55:47 AM, Robert Harrison (rharri...@aimg.com) wrote: I'm sending an Ajax post to a CF page. The post data looks like (below) in the counsel: Object {name: "rid", value: "1"} How in the heck to I get that value on the ColdFusion page? Robert Harrison Full Stack Developer AIMG <mailto:rharri...@aimg.com> rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 <http://www.aimg.com/> www.aimg.com ~| 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:360415 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax Post Value on CF Side
Looks like a basic JSON value. Just parse it and you should have it put into a variable. or am I not understanding the question? I have yet to have my morning coffee. On Tue, Apr 7, 2015 at 8:55 AM, Robert Harrison wrote: > > I'm sending an Ajax post to a CF page. The post data looks like (below) in > the counsel: > > > > Object {name: "rid", value: "1"} > > > > How in the heck to I get that value on the ColdFusion page? > > > > > > Robert Harrison > Full Stack Developer > AIMG > <mailto:rharri...@aimg.com> rharri...@aimg.com > Main Office: 704-321-1234 ext.118 > Direct Line: 516-302-4345 > <http://www.aimg.com/> www.aimg.com > > > > > > > > > > ~| 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:360414 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Ajax Post Value on CF Side
I'm sending an Ajax post to a CF page. The post data looks like (below) in the counsel: Object {name: "rid", value: "1"} How in the heck to I get that value on the ColdFusion page? Robert Harrison Full Stack Developer AIMG <mailto:rharri...@aimg.com> rharri...@aimg.com Main Office: 704-321-1234 ext.118 Direct Line: 516-302-4345 <http://www.aimg.com/> www.aimg.com ~| 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:360413 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can you use a CFTHREAD inside an Ajax routine?
I always just comment out the cfthread to single thread it and test there's no errors. On Monday, March 16, 2015, John Pullam wrote: > > The original answer that this does work was enough to get me headed in the > right direction. I eventually found a bug in my code; the CFTHREAD was > starting up the task correctly. > > ~| 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:360264 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can you use a CFTHREAD inside an Ajax routine?
The original answer that this does work was enough to get me headed in the right direction. I eventually found a bug in my code; the CFTHREAD was starting up the task correctly. ~| 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:360263 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Can you use a CFTHREAD inside an Ajax routine?
Steven, What is it that is telling you that the thread is not running? What is it supposed to do that it is not, manipulate the file system, execute a stored procedure? Is it supposed to return a value that you are not seeing? Remember that a function that initiates a thread will continue to run without waiting for the thread to finish unless a join action is performed. Dave -Original Message- From: Bobby [mailto:bo...@acoderslife.com] Sent: Thursday, March 12, 2015 10:49 AM To: cf-talk Subject: Re: Can you use a CFTHREAD inside an Ajax routine? When you say it doesn¹t generate any errors, do you mean that you¹ve looked through the exception logs? Unless you are trapping it with try/catch or a custom error handler, that¹s the only place you would discover that an error happened in a cfthread that you are spawning and forgetting. On 3/5/15, 3:47 PM, "John Pullam" wrote: > >It seems to me that the CFTHREAD I attempt to start from inside an Ajax >routine (triggered by a CFWINDOW) never runs and doesn't generate any >error message. Can anyone advise if this is a legitimate thing to do? > > ~| 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:360256 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can you use a CFTHREAD inside an Ajax routine?
When you say it doesn¹t generate any errors, do you mean that you¹ve looked through the exception logs? Unless you are trapping it with try/catch or a custom error handler, that¹s the only place you would discover that an error happened in a cfthread that you are spawning and forgetting. On 3/5/15, 3:47 PM, "John Pullam" wrote: > >It seems to me that the CFTHREAD I attempt to start from inside an Ajax >routine (triggered by a CFWINDOW) never runs and doesn't generate any >error message. Can anyone advise if this is a legitimate thing to do? > > ~| 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:360243 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Can you use a CFTHREAD inside an Ajax routine?
Yes, this works. I do it for an application I'm working on. The ajax call hits a page with a cfthread and it runs fine. I do have problems when that cfthread calls other cfm/cfc pages that also have cfthread in them. When that happens I get an error. Steve -Original Message- From: John Pullam [mailto:jpul...@mcleansystems.com] Sent: Thursday, March 05, 2015 3:48 PM To: cf-talk Subject: Can you use a CFTHREAD inside an Ajax routine? It seems to me that the CFTHREAD I attempt to start from inside an Ajax routine (triggered by a CFWINDOW) never runs and doesn't generate any error message. Can anyone advise if this is a legitimate thing to do? ~| 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:360206 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Can you use a CFTHREAD inside an Ajax routine?
It seems to me that the CFTHREAD I attempt to start from inside an Ajax routine (triggered by a CFWINDOW) never runs and doesn't generate any error message. Can anyone advise if this is a legitimate thing to do? ~| 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:360205 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: AJAX request returning 304
Donnie, I don't see a reason why a cfheader tag wouldn't work, and if it fails it's easy enough to add in the missing tags. Personally, I would convert it to a function in a cfc. David Phelan Web Developer IT Security & Web Technologies Emerging Health Montefiore Information Technology 3 Odell Plaza, Yonkers, NY 10701 914-457-6465 Office dphe...@emerginghealthit.com www.emerginghealthit.com www.montefiore.org From: Donnie Carvajal Sent: Wednesday, August 27, 2014 1:00 PM To: cf-talk Subject: AJAX request returning 304 I have an ajax request calling a ColdFusion template. Each time the ajax function is called, the ColdFusion template should return the next 20 rows of a query. I am running into an issue where the browser thinks the ColdFusion template hasn't changed since a 304 http status code is returned. I don't have an html or head tag in the CF template, so I don't believe a cfheader tag will work. Does anyone know how to prevent a CF template from returning a 304 http status code? Thanks, Donnie Carvajal ~| 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:359202 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
AJAX request returning 304
I have an ajax request calling a ColdFusion template. Each time the ajax function is called, the ColdFusion template should return the next 20 rows of a query. I am running into an issue where the browser thinks the ColdFusion template hasn't changed since a 304 http status code is returned. I don't have an html or head tag in the CF template, so I don't believe a cfheader tag will work. Does anyone know how to prevent a CF template from returning a 304 http status code? Thanks, Donnie Carvajal ~| 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:359200 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) what in a ajax page could block a jquery click listener?
It could be anything from a simple spelling error, to a missing character, or any number of problems. You'll to show some code in order for anyone to be able to help. Rick On Wed, Jun 5, 2013 at 9:32 PM, morchella wrote: > > i am stuck. > cant show any code. but most of it is old. > tried to stick a simple move multi select box into an existing page that > does all sort of ajax call i can figure out. > > the jq stuff work fine in most/90% of the site > just this one page it is confusing me.. > > > may have to re-write the form. > sick of ajax and cf7. > > > =] > > any ideas one what i should look for? > a way to catch trap pass what is failing? > > i appreciate ANY ideas. > -m > > > ~| 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:355872 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
(ot) what in a ajax page could block a jquery click listener?
i am stuck. cant show any code. but most of it is old. tried to stick a simple move multi select box into an existing page that does all sort of ajax call i can figure out. the jq stuff work fine in most/90% of the site just this one page it is confusing me.. may have to re-write the form. sick of ajax and cf7. =] any ideas one what i should look for? a way to catch trap pass what is failing? i appreciate ANY ideas. -m ~| 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:355871 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: odd (I think) ajax related problem
I'll try that. Thanks. -Original Message- From: morgan lindley [mailto:greyk...@gmail.com] Sent: Tuesday, May 21, 2013 3:45 PM To: cf-talk Subject: Re: odd (I think) ajax related problem Use the complete/success/callback of your ajax call to run this code block: var x = $('#TheBldg').val(); // storage of passed parameter alert(x); if ( x.length > 0 ) { $('#bldgID').val(x).prop('selected',true); } That should ensure the select is available to jquery before attempting to set it to selected. On Tue, May 21, 2013 at 2:38 PM, Stephens, Larry V wrote: > > No error but I don't think it kills the render - just delays it. It works > okay when I insert what amounts to a delay with the alert(). > > Only tried it in Firefox so far. > > > > -Original Message- > From: Maureen [mailto:mamamaur...@gmail.com] > Sent: Tuesday, May 21, 2013 11:54 AM > To: cf-talk > Subject: Re: odd (I think) ajax related problem > > > Are you getting an error? If so, what is it? If not, I suspect the > large number of values for the form select may be killing your page > render. Are you having the same results in all browsers? > > On Tue, May 21, 2013 at 7:54 AM, Stephens, Larry V > wrote: > > > > 1. Load a page > > 2. Use an ajax call and jQuery to populate a select (verified that the > value I'm seeking is loaded) > > > > 3. Using a passed parameter (stored in a hidden field), set the proper > option to selected (and this code could be optimized, before anyone > mentions it) > > > > I've done this many times and it works. > > > > This time it doesn't. If I put in an alert (originally done to make sure > the value I want is really there), then it works. Without the alert, it > doesn't. > > > > ~| 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:355827 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: odd (I think) ajax related problem
Use the complete/success/callback of your ajax call to run this code block: var x = $('#TheBldg').val(); // storage of passed parameter alert(x); if ( x.length > 0 ) { $('#bldgID').val(x).prop('selected',true); } That should ensure the select is available to jquery before attempting to set it to selected. On Tue, May 21, 2013 at 2:38 PM, Stephens, Larry V wrote: > > No error but I don't think it kills the render - just delays it. It works > okay when I insert what amounts to a delay with the alert(). > > Only tried it in Firefox so far. > > > > -Original Message- > From: Maureen [mailto:mamamaur...@gmail.com] > Sent: Tuesday, May 21, 2013 11:54 AM > To: cf-talk > Subject: Re: odd (I think) ajax related problem > > > Are you getting an error? If so, what is it? If not, I suspect the > large number of values for the form select may be killing your page > render. Are you having the same results in all browsers? > > On Tue, May 21, 2013 at 7:54 AM, Stephens, Larry V > wrote: > > > > 1. Load a page > > 2. Use an ajax call and jQuery to populate a select (verified that the > value I'm seeking is loaded) > > > > 3. Using a passed parameter (stored in a hidden field), set the proper > option to selected (and this code could be optimized, before anyone > mentions it) > > > > I've done this many times and it works. > > > > This time it doesn't. If I put in an alert (originally done to make sure > the value I want is really there), then it works. Without the alert, it > doesn't. > > > > ~| 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:355813 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: odd (I think) ajax related problem
No error but I don't think it kills the render - just delays it. It works okay when I insert what amounts to a delay with the alert(). Only tried it in Firefox so far. -Original Message- From: Maureen [mailto:mamamaur...@gmail.com] Sent: Tuesday, May 21, 2013 11:54 AM To: cf-talk Subject: Re: odd (I think) ajax related problem Are you getting an error? If so, what is it? If not, I suspect the large number of values for the form select may be killing your page render. Are you having the same results in all browsers? On Tue, May 21, 2013 at 7:54 AM, Stephens, Larry V wrote: > > 1. Load a page > 2. Use an ajax call and jQuery to populate a select (verified that the value > I'm seeking is loaded) > > 3. Using a passed parameter (stored in a hidden field), set the proper option > to selected (and this code could be optimized, before anyone mentions it) > > I've done this many times and it works. > > This time it doesn't. If I put in an alert (originally done to make sure the > value I want is really there), then it works. Without the alert, it doesn't. ~| 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:355812 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: odd (I think) ajax related problem
Are you getting an error? If so, what is it? If not, I suspect the large number of values for the form select may be killing your page render. Are you having the same results in all browsers? On Tue, May 21, 2013 at 7:54 AM, Stephens, Larry V wrote: > > 1. Load a page > 2. Use an ajax call and jQuery to populate a select (verified that the value > I'm seeking is loaded) > > 3. Using a passed parameter (stored in a hidden field), set the proper option > to selected (and this code could be optimized, before anyone mentions it) > > I've done this many times and it works. > > This time it doesn't. If I put in an alert (originally done to make sure the > value I want is really there), then it works. Without the alert, it doesn't. ~| 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:355811 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
odd (I think) ajax related problem
1. Load a page 2. Use an ajax call and jQuery to populate a select (verified that the value I'm seeking is loaded) 3. Using a passed parameter (stored in a hidden field), set the proper option to selected (and this code could be optimized, before anyone mentions it) I've done this many times and it works. This time it doesn't. If I put in an alert (originally done to make sure the value I want is really there), then it works. Without the alert, it doesn't. var x = $('#TheBldg').val(); // storage of passed parameter alert(x); if ( x.length > 0 ) { $('#bldgID').val(x).prop('selected',true); } In this case I suspect it's a timing issue. Populating the select adds ~800 options. That's a lot and there are ways I could cut that down, but right now it's 800. Could it be that something isn't getting updated because of so many options so my code to set the selected index runs too soon without the alert to slow things down? ~| 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:355810 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Does AJAX work with Shared SSL
OK, I got it to work using a widget called AjaxRequest that I read about in the book Ajax Design Patterns. Thanks for the assistance. ~| 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:355133 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Does AJAX work with Shared SSL
So use JSON/P or CORS. :) If you Google, you can find multiple blog posts (by myself, and Nadel) on both of these topics. Both are easy to do with ColdFusion. On Fri, Mar 22, 2013 at 9:03 AM, Byte Me wrote: > > >Are you saying your HTML is NOT on the Shared SSL and your Ajax resource > >is? If so, you're going to run into the cross domain security issue. You > >can use JSON/P or CORS to get around it. > > > > > > > > > >> > Hi, > my html & Ajax resource is not on the same server as the shared ssl server. > > This is what I got back when I submitted my trouble ticket: > > The issue is, that the shared ssl has a different 'home path' in IIS than > your site has, so your current code is looking for the cfc in: > > D:\home\securec4.hostek.net\wwwroot\xx.cfc > > Instead of looking for it in: > > D:\home\yoursite.com\wwwroot\xx.cfc > > ~| 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:355132 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Does AJAX work with Shared SSL
the way shared SSL works is that your host provide a generic acme.comdomain for SSL purposes, and gives you a folder on that domain to store your secure pages so that you do not have to buy your own SSL certificate. so if your domain is yoursite.com, your SSL pages would be redirected to www.acme.com/yoursite.com So you are using 2 different domains. Browsers will not allow you to send data between 2 different domains for security reasons, otherwise this would allow malware scripts to grab your account details from site1 and send them to site2. Therefore any Javascript/Ajax code you use must reside within one domain or the other. This is one reason why shared ssl is bad, the other is because savvy customers will notice they are being redirected to a different domain and if it is an eCommerce site may decide it is dodgy and not go ahead with purchase. On Fri, Mar 22, 2013 at 1:52 PM, Raymond Camden wrote: > > Are you saying your HTML is NOT on the Shared SSL and your Ajax resource > is? If so, you're going to run into the cross domain security issue. You > can use JSON/P or CORS to get around it. > > > On Fri, Mar 22, 2013 at 8:30 AM, Byte Me wrote: > > > > > Hi, > > my website and shared ssl use different servers (my site is hosted). Can > > someone tell me for sure if ajax can work with shared ssl. When I try to > > use ajax with shared ssl I get a security type error. I could have sworn > > that this had been working fine, but now I get an error. I am wondering > if > > this is a mapping problem of some kind. > > > > > > > > thanks, > > Kevin > > > > > > ~| 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:355131 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Does AJAX work with Shared SSL
>Are you saying your HTML is NOT on the Shared SSL and your Ajax resource >is? If so, you're going to run into the cross domain security issue. You >can use JSON/P or CORS to get around it. > > > > >> Hi, my html & Ajax resource is not on the same server as the shared ssl server. This is what I got back when I submitted my trouble ticket: The issue is, that the shared ssl has a different 'home path' in IIS than your site has, so your current code is looking for the cfc in: D:\home\securec4.hostek.net\wwwroot\xx.cfc Instead of looking for it in: D:\home\yoursite.com\wwwroot\xx.cfc ~| 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:355130 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Does AJAX work with Shared SSL
Are you saying your HTML is NOT on the Shared SSL and your Ajax resource is? If so, you're going to run into the cross domain security issue. You can use JSON/P or CORS to get around it. On Fri, Mar 22, 2013 at 8:30 AM, Byte Me wrote: > > Hi, > my website and shared ssl use different servers (my site is hosted). Can > someone tell me for sure if ajax can work with shared ssl. When I try to > use ajax with shared ssl I get a security type error. I could have sworn > that this had been working fine, but now I get an error. I am wondering if > this is a mapping problem of some kind. > > > > thanks, > Kevin > > ~| 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:355129 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Does AJAX work with Shared SSL
Hi, my website and shared ssl use different servers (my site is hosted). Can someone tell me for sure if ajax can work with shared ssl. When I try to use ajax with shared ssl I get a security type error. I could have sworn that this had been working fine, but now I get an error. I am wondering if this is a mapping problem of some kind. thanks, Kevin ~| 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:355128 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax tutorial or book
There is a bunch of stuff on Ray Camden's site. http://www.raymondcamden.com/search.cfm?search=cfc&category=BDF5ED6A-19B9-E658-9D5AB2B5C94A6A95 It might take a bit to tease it out. You might want to take a look at Ben Nadel's site and search for jQuery and CFC. Here is one that I found. It might be a bit dense to get started but he documents things nicely. http://www.bennadel.com/blog/1515-Ask-Ben-Building-An-AJAX-jQuery-And-ColdFusion-Powered-Application.htm That should get you going. Have fun! G! On Thu, Mar 21, 2013 at 7:26 AM, Huff, Jerome P (IS) wrote: > > I have been using CF for 8 years and now have a project that I think ajax > will be great for, but I don't understand how to get started. I have > looked at some tutorials, but I don't understand where to place the CFC's > that will return the ajax data... Can anyone recommend a good book or > tutorial for a beginner. We are running CF 9 if that matters. > > Thanks > > Jerome Huff > > > > ~| 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:355123 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax tutorial or book
If you are interested in the AJAX features built into ColdFusion then the best place to start would be the free Adobe CF manuals. http://help.adobe.com/en_US/ColdFusion/9.0/Developing/index.html That is all that I used when learning how to use the features, along with experimentation in code. -Mike Chabot On Thu, Mar 21, 2013 at 7:26 AM, Huff, Jerome P (IS) wrote: > > I have been using CF for 8 years and now have a project that I think ajax > will be great for, but I don't understand how to get started. I have > looked at some tutorials, but I don't understand where to place the CFC's > that will return the ajax data... Can anyone recommend a good book or > tutorial for a beginner. We are running CF 9 if that matters. > > Thanks > > Jerome Huff > > > > ~| 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:355121 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax tutorial or book
On Thu, Mar 21, 2013 at 7:26 AM, Huff, Jerome P (IS) wrote: > I have been using CF for 8 years and now have a project that I think ajax > will be great for, but I don't understand how to get started. I have > looked at some tutorials, but I don't understand where to place the CFC's > that will return the ajax data... Can anyone recommend a good book or > tutorial for a beginner. We are running CF 9 if that matters. > This is a pretty broad question. Typically you'd put the CFCs in your webroot, just like a cfm file. If you are using a framework. or need some security, you might end up putting them elsewhere. -Cameron ... ~| 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:355120 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Ajax tutorial or book
I have been using CF for 8 years and now have a project that I think ajax will be great for, but I don't understand how to get started. I have looked at some tutorials, but I don't understand where to place the CFC's that will return the ajax data... Can anyone recommend a good book or tutorial for a beginner. We are running CF 9 if that matters. Thanks Jerome Huff ~| 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:355119 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax inserts / updates and CF
You don't necessarily have to turn it off. Just select dockable.cfm - that I believe allows you to have debugging on while using Ajax. That said, I've found it much better simply to use the firebug and web tools plugins in either FF or Chrome to debug Ajax requests. > This is a great move and highly recommended for the reasons you > mention, but also if you plan to go mobile. Just a tip for you...make > sure you turn CF debugging OFF when testing your jquery ajax calls > because if you leave it on, it may appear that your ajax is not > working at all with no js errors. Also, I would recommend you use > firefox as a browser and firebug to debug your jquery code. Hope this > helps. > > >Hi Folks, > > > >We're getting ready to implement some ajax code in our application to > enable > >queries (esp inserts and updates) to run without having to do a full > page > >refresh (the main goal being to just improve page load performance). > >There's obviously a lot of info out there on this topic and I'm > interested > >in getting a little feedback about what might be best or most > appropriate. > >For instance, are there any recommended examples / tutorials for > doing this > >with CF? Would this sort of thing likely use jquery or just straight > custom > >javascript? > > > >Many thanks in advance. > > > >Nick ~| 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:353822 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax inserts / updates and CF
If you are on a properly patched (and updated) version of CF 9.01 or higher, then CF Debugging will/should have no effect on your ajax calls, if you are directly calling a cfc. Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book "The best way to predict the future is to help create it" On 1/9/2013 2:15 PM, Theresa Temple wrote: > This is a great move and highly recommended for the reasons you mention, but > also if you plan to go mobile. Just a tip for you...make sure you turn CF > debugging OFF when testing your jquery ajax calls because if you leave it on, > it may appear that your ajax is not working at all with no js errors. Also, I > would recommend you use firefox as a browser and firebug to debug your jquery > code. Hope this helps. > >> Hi Folks, >> >> We're getting ready to implement some ajax code in our application to enable >> queries (esp inserts and updates) to run without having to do a full page >> refresh (the main goal being to just improve page load performance). >> There's obviously a lot of info out there on this topic and I'm interested >> in getting a little feedback about what might be best or most appropriate. >> For instance, are there any recommended examples / tutorials for doing this >> with CF? Would this sort of thing likely use jquery or just straight custom >> javascript? >> >> Many thanks in advance. >> >> Nick > ~| 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:353820 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax inserts / updates and CF
This is a great move and highly recommended for the reasons you mention, but also if you plan to go mobile. Just a tip for you...make sure you turn CF debugging OFF when testing your jquery ajax calls because if you leave it on, it may appear that your ajax is not working at all with no js errors. Also, I would recommend you use firefox as a browser and firebug to debug your jquery code. Hope this helps. >Hi Folks, > >We're getting ready to implement some ajax code in our application to enable >queries (esp inserts and updates) to run without having to do a full page >refresh (the main goal being to just improve page load performance). >There's obviously a lot of info out there on this topic and I'm interested >in getting a little feedback about what might be best or most appropriate. >For instance, are there any recommended examples / tutorials for doing this >with CF? Would this sort of thing likely use jquery or just straight custom >javascript? > >Many thanks in advance. > >Nick ~| 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:353817 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax inserts / updates and CF
I would advise being a bit more careful about this. I agree - don't use the stuff built in CF directly - but I think we are all talking about the CF "UI" stuff. I consider the CFC/returnFormat=json as part of CF's Ajax support and I'd definitely recommend using it. On Tue, Jan 8, 2013 at 1:05 PM, Russ Michaels wrote: > > yes, I mistyped, should have said "I suggest NOT using" :-) > > > > On Tue, Jan 8, 2013 at 6:48 PM, Rick Faircloth >wrote: > > > > > Russ, were you advising Nick to "not" use the > > stuff built into CF? > > > > If so, I agree. jQuery is the way to go. I tried > > working with CF's functionality, jQuery was much > > easier for me to learn. > > > > Rick > > > > -Original Message- > > From: Russ Michaels [mailto:r...@michaels.me.uk] > > Sent: Tuesday, January 08, 2013 8:58 AM > > To: cf-talk > > Subject: Re: Ajax inserts / updates and CF > > > > > > I would really suggest using the stuff built into CF. > > Your better off using jquery, there are tons of tutorials out ther eon > > jquery and jquery with CF. > > > > > > On Mon, Jan 7, 2013 at 11:28 PM, Nick Gleason > >wrote: > > > > > > > > Hi Folks, > > > > > > We're getting ready to implement some ajax code in our application to > > > enable > > > queries (esp inserts and updates) to run without having to do a full > page > > > refresh (the main goal being to just improve page load performance). > > > There's obviously a lot of info out there on this topic and I'm > > interested > > > in getting a little feedback about what might be best or most > > appropriate. > > > For instance, are there any recommended examples / tutorials for doing > > this > > > with CF? Would this sort of thing likely use jquery or just straight > > > custom > > > javascript? > > > > > > Many thanks in advance. > > > > > > Nick > > > > > > > > > > > > > > > > > > > > > > > > > > > > ~| 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:353815 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax inserts / updates and CF
yes, I mistyped, should have said "I suggest NOT using" :-) On Tue, Jan 8, 2013 at 6:48 PM, Rick Faircloth wrote: > > Russ, were you advising Nick to "not" use the > stuff built into CF? > > If so, I agree. jQuery is the way to go. I tried > working with CF's functionality, jQuery was much > easier for me to learn. > > Rick > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Tuesday, January 08, 2013 8:58 AM > To: cf-talk > Subject: Re: Ajax inserts / updates and CF > > > I would really suggest using the stuff built into CF. > Your better off using jquery, there are tons of tutorials out ther eon > jquery and jquery with CF. > > > On Mon, Jan 7, 2013 at 11:28 PM, Nick Gleason >wrote: > > > > > Hi Folks, > > > > We're getting ready to implement some ajax code in our application to > > enable > > queries (esp inserts and updates) to run without having to do a full page > > refresh (the main goal being to just improve page load performance). > > There's obviously a lot of info out there on this topic and I'm > interested > > in getting a little feedback about what might be best or most > appropriate. > > For instance, are there any recommended examples / tutorials for doing > this > > with CF? Would this sort of thing likely use jquery or just straight > > custom > > javascript? > > > > Many thanks in advance. > > > > Nick > > > > > > > > > > > > > > > > ~| 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:353814 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Ajax inserts / updates and CF
Russ, were you advising Nick to "not" use the stuff built into CF? If so, I agree. jQuery is the way to go. I tried working with CF's functionality, jQuery was much easier for me to learn. Rick -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Tuesday, January 08, 2013 8:58 AM To: cf-talk Subject: Re: Ajax inserts / updates and CF I would really suggest using the stuff built into CF. Your better off using jquery, there are tons of tutorials out ther eon jquery and jquery with CF. On Mon, Jan 7, 2013 at 11:28 PM, Nick Gleason wrote: > > Hi Folks, > > We're getting ready to implement some ajax code in our application to > enable > queries (esp inserts and updates) to run without having to do a full page > refresh (the main goal being to just improve page load performance). > There's obviously a lot of info out there on this topic and I'm interested > in getting a little feedback about what might be best or most appropriate. > For instance, are there any recommended examples / tutorials for doing this > with CF? Would this sort of thing likely use jquery or just straight > custom > javascript? > > Many thanks in advance. > > Nick > > > > > > ~| 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:353813 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Convert JS variable to URL variable for AJAX function
YoururlString += YourVar += yourvalue On Mon, Jan 7, 2013 at 7:48 PM, Les Irvin wrote: > > I know this isn't technically a CF question (even though I'm using CF), but > I need some help putting a JS variable into a URL string to perform an Ajax > hit. It will probably take someone smarter than me about 2 minutes to > figure out, please contact me off-list if you think you can help. I'll > make a Paypal donation to the one who solves it for me. > > Thanks, > Les > > > ~| 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:353808 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Ajax inserts / updates and CF
I would really suggest using the stuff built into CF. Your better off using jquery, there are tons of tutorials out ther eon jquery and jquery with CF. On Mon, Jan 7, 2013 at 11:28 PM, Nick Gleason wrote: > > Hi Folks, > > We're getting ready to implement some ajax code in our application to > enable > queries (esp inserts and updates) to run without having to do a full page > refresh (the main goal being to just improve page load performance). > There's obviously a lot of info out there on this topic and I'm interested > in getting a little feedback about what might be best or most appropriate. > For instance, are there any recommended examples / tutorials for doing this > with CF? Would this sort of thing likely use jquery or just straight > custom > javascript? > > Many thanks in advance. > > Nick > > > > > > ~| 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:353807 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Ajax inserts / updates and CF
Hi Folks, We're getting ready to implement some ajax code in our application to enable queries (esp inserts and updates) to run without having to do a full page refresh (the main goal being to just improve page load performance). There's obviously a lot of info out there on this topic and I'm interested in getting a little feedback about what might be best or most appropriate. For instance, are there any recommended examples / tutorials for doing this with CF? Would this sort of thing likely use jquery or just straight custom javascript? Many thanks in advance. Nick ~| 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:353803 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Convert JS variable to URL variable for AJAX function
I know this isn't technically a CF question (even though I'm using CF), but I need some help putting a JS variable into a URL string to perform an Ajax hit. It will probably take someone smarter than me about 2 minutes to figure out, please contact me off-list if you think you can help. I'll make a Paypal donation to the one who solves it for me. Thanks, Les ~| 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:353800 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: AJAX Issue
You are most welcome. On Sun, Dec 23, 2012 at 5:14 PM, Bruce Sorge wrote: > > Thanks for the Video Ray. It was very helpful for debugging another part > of this site. Finally finished it though bug free and functions the way I > want. > > Bruce > On Dec 20, 2012, at 9:55 PM, Raymond Camden > wrote: > > > > > Here is a video demonstrating chrome dev tools: > > > > > http://www.raymondcamden.com/index.cfm/2011/6/15/Example-of-using-Chrome-Dev-tools-to-solve-Ajax-issues > > > > > > > ~| 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:353658 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: AJAX Issue
Thanks for the Video Ray. It was very helpful for debugging another part of this site. Finally finished it though bug free and functions the way I want. Bruce On Dec 20, 2012, at 9:55 PM, Raymond Camden wrote: > > Here is a video demonstrating chrome dev tools: > > http://www.raymondcamden.com/index.cfm/2011/6/15/Example-of-using-Chrome-Dev-tools-to-solve-Ajax-issues > > ~| 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:353652 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: AJAX Issue
Thanks Ray, I'll look into this for sure. And yeah, I am wrapping all the pages in a header, footer and nab in the application.cfc. I'll switch it to an include in the page instead. I've been out of web development for about 4 years and have obviously fallen behind the knowledge curve. Thanks for the input I'll work on this stuff tomorrow. Sent from my iPhone 4S. On Dec 20, 2012, at 9:55 PM, Raymond Camden wrote: > > Here is a video demonstrating chrome dev tools: > > http://www.raymondcamden.com/index.cfm/2011/6/15/Example-of-using-Chrome-Dev-tools-to-solve-Ajax-issues > > > On Thu, Dec 20, 2012 at 8:54 PM, Raymond Camden > wrote: > >> As to your error, it is very obvious if you use the Chrome Dev Tools. I >> cannot stress this enough. You *need* to learn how to use your browser dev >> tools as it makes this stuff a heck of a lot easier. >> >> I opened it up in Chrome, went to the Network panel, filtered on XHR. I >> then entered 88 in the first form field. >> >> I then saw a big ole graphic load. Why? It's obvious if you look at the >> result in the Network panel. Your server returned this: >> >> >> >> >> >> >> >> > href="Styles/Movement.css<http://www.makeaherodonations.com/themovement/Styles/Movement.css> >> " rel="stylesheet"> >> > href="favicon.ico<http://www.makeaherodonations.com/themovement/favicon.ico> >> "> >> >> >> >> The Movement DVD Download - Information >> >> >> >> >> >> >> >> >> >> >> >> >> > src="images/MAH-ski.jpeg<http://www.makeaherodonations.com/themovement/images/MAH-ski.jpeg> >> " alt="The Movement Movie Poster Image" /> >> The Code 88 is an invalid code. >> Please ree-enter your code. >> http://www.makeahero.org"; target="new">http://www.makeaherodonations.com/themovement/images/logo.png> >> " alt="Make A Hero Logo" /> >> Helping individuals with disabilities enjoy the freedom of sports >> and recreation >> >> Thank you for your interest in Make A Hero's first film, The Movement! If >> you would like to use this film as a fund-raiser please email mailto:i...@makeahero.org<http://www.makeaherodonations.com/themovement/mailto:i...@makeahero.org> >> ">i...@makeahero.org. For more information about our organization or >> ways that you can support our cause, please visit http://www.makeahero.org"; target="new">http://makeahero.org or email < >> a >> href="mailto:i...@makeahero.org<http://www.makeaherodonations.com/themovement/mailto:i...@makeahero.org> >> ">i...@makeahero.org. >> >> >> >> >> >> Most likely you ONLY wanted the "The code..." part. Most likely your CF >> code is wrapping everything with a header and footer. You need to stop >> doing that. :) >> >> >> >> On Thu, Dec 20, 2012 at 8:51 PM, Raymond Camden >> wrote: >> >>> I'll take a look, but I need to nitpick something. AJAX isn't a language. >>> It is simply the name of a technique used in JavaScript to communicate with >>> a server. Spry uses AJAX too. (But don't use Spry anymore. It's old like >>> Donkey Kong.) >>> >>> >>> On Thu, Dec 20, 2012 at 7:49 PM, Bruce Sorge wrote: >>> >>>> >>>> OK, so I gave up on the Spry version of the database validation and >>>> moved onto AJAX (a language I really don't know a lot about but I am slowly >>>> figuring it out). Anyway, I have the code working the way I want with the >>>> exception that when the validation is done, whether the code is valid or >>>> not, the page is reloading and showing an overlay or something of the page. >>>> If you go to http://www.makeaherodonations.com/themovement/ you'll see >>>> what I am talking about. It's weird and I have been trying to figure this >>>> out. Here is the script: >>>> >>>> >>>> >>>> pic1 = new Image(16, 16); >>>> pic1.src = "images/loader.gif"; >>>> >>>> $(document).ready(function(){ >>>> >>>> $("#orgname").change(function() { >>>> >>>> var usr = $("#orgname").val(); >>>> >>>> if(usr.length >= 2) >>>> { >>>> $(
Re: AJAX Issue
Here is a video demonstrating chrome dev tools: http://www.raymondcamden.com/index.cfm/2011/6/15/Example-of-using-Chrome-Dev-tools-to-solve-Ajax-issues On Thu, Dec 20, 2012 at 8:54 PM, Raymond Camden wrote: > As to your error, it is very obvious if you use the Chrome Dev Tools. I > cannot stress this enough. You *need* to learn how to use your browser dev > tools as it makes this stuff a heck of a lot easier. > > I opened it up in Chrome, went to the Network panel, filtered on XHR. I > then entered 88 in the first form field. > > I then saw a big ole graphic load. Why? It's obvious if you look at the > result in the Network panel. Your server returned this: > > > > > > > > href="Styles/Movement.css<http://www.makeaherodonations.com/themovement/Styles/Movement.css> > " rel="stylesheet"> > href="favicon.ico<http://www.makeaherodonations.com/themovement/favicon.ico> > "> > > > > The Movement DVD Download - Information > > > > > > > > > > > > > src="images/MAH-ski.jpeg<http://www.makeaherodonations.com/themovement/images/MAH-ski.jpeg> > " alt="The Movement Movie Poster Image" /> > The Code 88 is an invalid code. > Please ree-enter your code. > http://www.makeahero.org"; target="new">http://www.makeaherodonations.com/themovement/images/logo.png> > " alt="Make A Hero Logo" /> > Helping individuals with disabilities enjoy the freedom of sports > and recreation > > Thank you for your interest in Make A Hero's first film, The Movement! If > you would like to use this film as a fund-raiser please email mailto:i...@makeahero.org<http://www.makeaherodonations.com/themovement/mailto:i...@makeahero.org> > ">i...@makeahero.org. For more information about our organization or > ways that you can support our cause, please visit http://www.makeahero.org"; target="new">http://makeahero.org or email < > a > href="mailto:i...@makeahero.org<http://www.makeaherodonations.com/themovement/mailto:i...@makeahero.org> > ">i...@makeahero.org. > > > > > > Most likely you ONLY wanted the "The code..." part. Most likely your CF > code is wrapping everything with a header and footer. You need to stop > doing that. :) > > > > On Thu, Dec 20, 2012 at 8:51 PM, Raymond Camden > wrote: > >> I'll take a look, but I need to nitpick something. AJAX isn't a language. >> It is simply the name of a technique used in JavaScript to communicate with >> a server. Spry uses AJAX too. (But don't use Spry anymore. It's old like >> Donkey Kong.) >> >> >> On Thu, Dec 20, 2012 at 7:49 PM, Bruce Sorge wrote: >> >>> >>> OK, so I gave up on the Spry version of the database validation and >>> moved onto AJAX (a language I really don't know a lot about but I am slowly >>> figuring it out). Anyway, I have the code working the way I want with the >>> exception that when the validation is done, whether the code is valid or >>> not, the page is reloading and showing an overlay or something of the page. >>> If you go to http://www.makeaherodonations.com/themovement/ you'll see >>> what I am talking about. It's weird and I have been trying to figure this >>> out. Here is the script: >>> >>> >>> >>> pic1 = new Image(16, 16); >>> pic1.src = "images/loader.gif"; >>> >>> $(document).ready(function(){ >>> >>> $("#orgname").change(function() { >>> >>> var usr = $("#orgname").val(); >>> >>> if(usr.length >= 2) >>> { >>> $("#status").html('<img align="absmiddle" src="images/loader.gif" /> >>> Checking Code...'); >>> >>> $.ajax({ >>> type: "POST", >>> url: "checkcode.cfm", >>> data: "orgname="+ usr, >>> success: function(msg){ >>> >>> $("#status").ajaxComplete(function(event, request, settings){ >>> >>> if(msg == 'OK') >>> { >>> $("#orgname").removeClass('object_error'); // if necessary >>> $("#orgname").addClass("object_ok"); >>> $(this).html(' <img align="absmiddle" src="images/accepted.png" /> '); >>> } >>> else >>> { >>> $("#orgname").removeClass('object_ok'); // if necessary >>> $("#orgname").addClass("object_error"); >>> $(this).html(msg); >>> }});}});} >>> else >>> { >>> $("#status").html('The Code should have at least 2 characters.'); >>> $("#orgname").removeClass('object_ok'); // if necessary >>> $("#orgname").addClass("object_error"); >>> }});}); >>> >>> //--> >>> >>> >>> >>> I think that I'll have to head to the bookstore tomorrow and get me an >>> AJAX book. It seems pretty cool and something that I can use in the future. >>> >>> Bruce >>> >>> ~| 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:353593 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: AJAX Issue
As to your error, it is very obvious if you use the Chrome Dev Tools. I cannot stress this enough. You *need* to learn how to use your browser dev tools as it makes this stuff a heck of a lot easier. I opened it up in Chrome, went to the Network panel, filtered on XHR. I then entered 88 in the first form field. I then saw a big ole graphic load. Why? It's obvious if you look at the result in the Network panel. Your server returned this: http://www.makeaherodonations.com/themovement/Styles/Movement.css> " rel="stylesheet"> http://www.makeaherodonations.com/themovement/favicon.ico> "> The Movement DVD Download - Information http://www.makeaherodonations.com/themovement/images/MAH-ski.jpeg> " alt="The Movement Movie Poster Image" /> The Code 88 is an invalid code. Please ree-enter your code. http://www.makeahero.org"; target="new">http://www.makeaherodonations.com/themovement/images/logo.png> " alt="Make A Hero Logo" /> Helping individuals with disabilities enjoy the freedom of sports and recreation Thank you for your interest in Make A Hero's first film, The Movement! If you would like to use this film as a fund-raiser please email mailto:i...@makeahero.org<http://www.makeaherodonations.com/themovement/mailto:i...@makeahero.org> ">i...@makeahero.org. For more information about our organization or ways that you can support our cause, please visit http://www.makeahero.org"; target="new">http://makeahero.org or email mailto:i...@makeahero.org<http://www.makeaherodonations.com/themovement/mailto:i...@makeahero.org> ">i...@makeahero.org. Most likely you ONLY wanted the "The code..." part. Most likely your CF code is wrapping everything with a header and footer. You need to stop doing that. :) On Thu, Dec 20, 2012 at 8:51 PM, Raymond Camden wrote: > I'll take a look, but I need to nitpick something. AJAX isn't a language. > It is simply the name of a technique used in JavaScript to communicate with > a server. Spry uses AJAX too. (But don't use Spry anymore. It's old like > Donkey Kong.) > > > On Thu, Dec 20, 2012 at 7:49 PM, Bruce Sorge wrote: > >> >> OK, so I gave up on the Spry version of the database validation and moved >> onto AJAX (a language I really don't know a lot about but I am slowly >> figuring it out). Anyway, I have the code working the way I want with the >> exception that when the validation is done, whether the code is valid or >> not, the page is reloading and showing an overlay or something of the page. >> If you go to http://www.makeaherodonations.com/themovement/ you'll see >> what I am talking about. It's weird and I have been trying to figure this >> out. Here is the script: >> >> >> >> pic1 = new Image(16, 16); >> pic1.src = "images/loader.gif"; >> >> $(document).ready(function(){ >> >> $("#orgname").change(function() { >> >> var usr = $("#orgname").val(); >> >> if(usr.length >= 2) >> { >> $("#status").html('<img align="absmiddle" src="images/loader.gif" /> >> Checking Code...'); >> >> $.ajax({ >> type: "POST", >> url: "checkcode.cfm", >> data: "orgname="+ usr, >> success: function(msg){ >> >> $("#status").ajaxComplete(function(event, request, settings){ >> >> if(msg == 'OK') >> { >> $("#orgname").removeClass('object_error'); // if necessary >> $("#orgname").addClass("object_ok"); >> $(this).html(' <img align="absmiddle" src="images/accepted.png" /> '); >> } >> else >> { >> $("#orgname").removeClass('object_ok'); // if necessary >> $("#orgname").addClass("object_error"); >> $(this).html(msg); >> }});}});} >> else >> { >> $("#status").html('The Code should have at least 2 characters.'); >> $("#orgname").removeClass('object_ok'); // if necessary >> $("#orgname").addClass("object_error"); >> }});}); >> >> //--> >> >> >> >> I think that I'll have to head to the bookstore tomorrow and get me an >> AJAX book. It seems pretty cool and something that I can use in the future. >> >> Bruce >> >> ~| 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:353592 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: AJAX Issue
I'll take a look, but I need to nitpick something. AJAX isn't a language. It is simply the name of a technique used in JavaScript to communicate with a server. Spry uses AJAX too. (But don't use Spry anymore. It's old like Donkey Kong.) On Thu, Dec 20, 2012 at 7:49 PM, Bruce Sorge wrote: > > OK, so I gave up on the Spry version of the database validation and moved > onto AJAX (a language I really don't know a lot about but I am slowly > figuring it out). Anyway, I have the code working the way I want with the > exception that when the validation is done, whether the code is valid or > not, the page is reloading and showing an overlay or something of the page. > If you go to http://www.makeaherodonations.com/themovement/ you'll see > what I am talking about. It's weird and I have been trying to figure this > out. Here is the script: > > > > pic1 = new Image(16, 16); > pic1.src = "images/loader.gif"; > > $(document).ready(function(){ > > $("#orgname").change(function() { > > var usr = $("#orgname").val(); > > if(usr.length >= 2) > { > $("#status").html('<img align="absmiddle" src="images/loader.gif" /> > Checking Code...'); > > $.ajax({ > type: "POST", > url: "checkcode.cfm", > data: "orgname="+ usr, > success: function(msg){ > > $("#status").ajaxComplete(function(event, request, settings){ > > if(msg == 'OK') > { > $("#orgname").removeClass('object_error'); // if necessary > $("#orgname").addClass("object_ok"); > $(this).html(' <img align="absmiddle" src="images/accepted.png" /> '); > } > else > { > $("#orgname").removeClass('object_ok'); // if necessary > $("#orgname").addClass("object_error"); > $(this).html(msg); > }});}});} > else > { > $("#status").html('The Code should have at least 2 characters.'); > $("#orgname").removeClass('object_ok'); // if necessary > $("#orgname").addClass("object_error"); > }});}); > > //--> > > > > I think that I'll have to head to the bookstore tomorrow and get me an > AJAX book. It seems pretty cool and something that I can use in the future. > > Bruce > > ~| 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:353591 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
AJAX Issue
OK, so I gave up on the Spry version of the database validation and moved onto AJAX (a language I really don't know a lot about but I am slowly figuring it out). Anyway, I have the code working the way I want with the exception that when the validation is done, whether the code is valid or not, the page is reloading and showing an overlay or something of the page. If you go to http://www.makeaherodonations.com/themovement/ you'll see what I am talking about. It's weird and I have been trying to figure this out. Here is the script: pic1 = new Image(16, 16); pic1.src = "images/loader.gif"; $(document).ready(function(){ $("#orgname").change(function() { var usr = $("#orgname").val(); if(usr.length >= 2) { $("#status").html('<img align="absmiddle" src="images/loader.gif" /> Checking Code...'); $.ajax({ type: "POST", url: "checkcode.cfm", data: "orgname="+ usr, success: function(msg){ $("#status").ajaxComplete(function(event, request, settings){ if(msg == 'OK') { $("#orgname").removeClass('object_error'); // if necessary $("#orgname").addClass("object_ok"); $(this).html(' <img align="absmiddle" src="images/accepted.png" /> '); } else { $("#orgname").removeClass('object_ok'); // if necessary $("#orgname").addClass("object_error"); $(this).html(msg); }});}});} else { $("#status").html('The Code should have at least 2 characters.'); $("#orgname").removeClass('object_ok'); // if necessary $("#orgname").addClass("object_error"); }});}); //--> I think that I'll have to head to the bookstore tomorrow and get me an AJAX book. It seems pretty cool and something that I can use in the future. Bruce ~| 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:353590 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using AJAX with Authorize.net
I don't have time right now to delve into the details of coming up with a new way to use Authorize.net and what you're trying to do isn't an "approved" method of integration. Their approach for what you're wanting to do is the Direct Post Method: http://developer.authorize.net/api/dpm Have you taken a look at its docs and examples? Once you have that method working and you really want to try something new you could try to migrate it to posting via AJAX instead of directly... On 9/23/12 6:27 PM, Rick Faircloth wrote: > When you say "endpoint", you mean the "success" > section of the code? That's always the way I do AJAX > when I'm sending requests to component methods for processing. > > Is there something about sending a post to another > server/domain that makes that unworkable? > >> not actually getting a response at all > Yes, I've noticed that from the start...nothing in Firebug > in the Response section in any browser. > > The only thing I see different in Firebug in Chrome is under > headers > RequestHeaders I've got these lines: > > Content-Typeapplication/x-www-form-urlencoded > Accept application/json, text/javascript, */*; q=0.01 > > Is there a disconnect between the content-type (sent? received?) > and what will be accepted (by my code? by Auth.net's server?) > Does this tell you anything? > > And you asked where in the Authorized.net docs have I seen this > "endpoint"... well, nowhere, but then, I haven't seen much of > anything except a ton of PHP code and an example of CF processing > using CFHTTP. > > I noticed that cfpayment uses CFHTTP in part of the programming. > If I use CFHTTP to process the form, does that mean that I'm now > handling the form data "on my server", requiring more stringent > PCI compliance that doing a straight AJAX post? > > I'm sure there's just something I don't understand about what's > going on, especially since this is my first experience with a > payment gateway, as well as the first time I've ever used AJAX > to post to another domain/site. > > So, is what I'm trying to do with my code even possible? > I'm getting correct processing on Authorize.net's end. They send > me the customer and merchant email receipts. > > I just can't figure out how to get a response back to my AJAX > function. > > Any more suggestions? > > Rick > > -Original Message- > From: .jonah [mailto:jonah@creori.com] > Sent: Sunday, September 23, 2012 3:51 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > I don't quite know how you're using that endpoint with AJAX. > > If you click on that URL in firebug, you'll see you're not actually > getting a response at all. > > Also, try your form in Chrome. > > I get this in the console: > XMLHttpRequest cannot load > https://test.authorize.net/gateway/transact.dll. Origin http:// server> is not allowed by Access-Control-Allow-Origin. > > Where in the authorize.net docs does it talk about using this endpoint > in this way? > > > On 9/23/12 5:54 AM, Rick Faircloth wrote: >> $(document).ready(function() { >> >> $('#donation_form_submit').click(function() { >> >>var x_login = '25F2wqnuFs'; >>var x_tran_key = '3B58p37d9PJxUUR9'; >>var x_relay_response= 'false'; >>var x_type = 'AUTH_CAPTURE'; >>var x_method= 'CC'; >>var x_description = 'Donation'; >> >>var x_card_num = $('#x_card_num').val(); >>var x_card_num = >> x_card_num.replace(/\D/g,''); >> >>var x_exp_date = >> $('#p_cc_exp_month').val()+$('#p_cc_exp_year').val(); >> >>var x_amount= >> $('input[name=x_amount]:checked').val(); >>var x_first_name= > $('#x_first_name').val(); >>var x_last_name = $('#x_last_name').val(); >>var x_address = $('#x_address').val(); >>var x_city = $('#x_city').val(); >>var x_state =
RE: Question about using AJAX with Authorize.net
When you say "endpoint", you mean the "success" section of the code? That's always the way I do AJAX when I'm sending requests to component methods for processing. Is there something about sending a post to another server/domain that makes that unworkable? > not actually getting a response at all Yes, I've noticed that from the start...nothing in Firebug in the Response section in any browser. The only thing I see different in Firebug in Chrome is under headers > RequestHeaders I've got these lines: Content-Typeapplication/x-www-form-urlencoded Accept application/json, text/javascript, */*; q=0.01 Is there a disconnect between the content-type (sent? received?) and what will be accepted (by my code? by Auth.net's server?) Does this tell you anything? And you asked where in the Authorized.net docs have I seen this "endpoint"... well, nowhere, but then, I haven't seen much of anything except a ton of PHP code and an example of CF processing using CFHTTP. I noticed that cfpayment uses CFHTTP in part of the programming. If I use CFHTTP to process the form, does that mean that I'm now handling the form data "on my server", requiring more stringent PCI compliance that doing a straight AJAX post? I'm sure there's just something I don't understand about what's going on, especially since this is my first experience with a payment gateway, as well as the first time I've ever used AJAX to post to another domain/site. So, is what I'm trying to do with my code even possible? I'm getting correct processing on Authorize.net's end. They send me the customer and merchant email receipts. I just can't figure out how to get a response back to my AJAX function. Any more suggestions? Rick -Original Message- From: .jonah [mailto:jonah@creori.com] Sent: Sunday, September 23, 2012 3:51 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net I don't quite know how you're using that endpoint with AJAX. If you click on that URL in firebug, you'll see you're not actually getting a response at all. Also, try your form in Chrome. I get this in the console: XMLHttpRequest cannot load https://test.authorize.net/gateway/transact.dll. Origin http:// is not allowed by Access-Control-Allow-Origin. Where in the authorize.net docs does it talk about using this endpoint in this way? On 9/23/12 5:54 AM, Rick Faircloth wrote: > $(document).ready(function() { > >$('#donation_form_submit').click(function() { > > var x_login = '25F2wqnuFs'; > var x_tran_key = '3B58p37d9PJxUUR9'; > var x_relay_response= 'false'; > var x_type = 'AUTH_CAPTURE'; > var x_method= 'CC'; > var x_description = 'Donation'; > > var x_card_num = $('#x_card_num').val(); > var x_card_num = > x_card_num.replace(/\D/g,''); > > var x_exp_date = > $('#p_cc_exp_month').val()+$('#p_cc_exp_year').val(); > > var x_amount= > $('input[name=x_amount]:checked').val(); > var x_first_name= $('#x_first_name').val(); > var x_last_name = $('#x_last_name').val(); > var x_address = $('#x_address').val(); > var x_city = $('#x_city').val(); > var x_state = $('#x_state').val(); > var x_zip = $('#x_zip').val(); > var x_email = $('#x_email').val(); > > values = { x_login:x_login, > x_tran_key: x_tran_key, > x_relay_response: x_relay_response, > x_type: x_type, > x_method: x_method, > x_description: x_description, > x_card_num: x_card_num, > x_exp_date: x_exp_date, > x_amount: x_amount, > x_first_name: x_first_name, > x_last_name:x_last_name, > x_a
Re: Question about using AJAX with Authorize.net
I don't quite know how you're using that endpoint with AJAX. If you click on that URL in firebug, you'll see you're not actually getting a response at all. Also, try your form in Chrome. I get this in the console: XMLHttpRequest cannot load https://test.authorize.net/gateway/transact.dll. Origin http:// is not allowed by Access-Control-Allow-Origin. Where in the authorize.net docs does it talk about using this endpoint in this way? On 9/23/12 5:54 AM, Rick Faircloth wrote: > $(document).ready(function() { > >$('#donation_form_submit').click(function() { > > var x_login = '25F2wqnuFs'; > var x_tran_key = '3B58p37d9PJxUUR9'; > var x_relay_response= 'false'; > var x_type = 'AUTH_CAPTURE'; > var x_method= 'CC'; > var x_description = 'Donation'; > > var x_card_num = $('#x_card_num').val(); > var x_card_num = > x_card_num.replace(/\D/g,''); > > var x_exp_date = > $('#p_cc_exp_month').val()+$('#p_cc_exp_year').val(); > > var x_amount= > $('input[name=x_amount]:checked').val(); > var x_first_name= $('#x_first_name').val(); > var x_last_name = $('#x_last_name').val(); > var x_address = $('#x_address').val(); > var x_city = $('#x_city').val(); > var x_state = $('#x_state').val(); > var x_zip = $('#x_zip').val(); > var x_email = $('#x_email').val(); > > values = { x_login:x_login, > x_tran_key: x_tran_key, > x_relay_response: x_relay_response, > x_type: x_type, > x_method: x_method, > x_description: x_description, > x_card_num: x_card_num, > x_exp_date: x_exp_date, > x_amount: x_amount, > x_first_name: x_first_name, > x_last_name:x_last_name, > x_address: x_address, > x_city: x_city, > x_state:x_state, > x_zip: x_zip, > x_email:x_email > } > > $.ajax ({ cache: false, > type: 'post', > url: > 'https://test.authorize.net/gateway/transact.dll', > dataType: 'json', > data: values, > > beforeSend: function() { > > > $('#processing_image').fadeIn(250); > > $('#processing_text').fadeIn(250); > > }, > > success:function(data) { > > (this alert never works...) -> alert('inside > success callback'); > > var parsedData = > data.split('|'); > > (nothing appears in the console log -> console.log('Data > Response:', data, 'Parsed Response:', parsedData); > > if ( > parsedData[0] == 1 ) > (this alert doesn't show) ---> { > alert('SUCCESS\nCode: ' + parsedData[0])} > > (this alert doesn't show) ---> else{ > alert('FAILURE\nCode: ' + parsedData[0] + '\nReason: ' + parsedData[3]) } > > > (this is the success code I&
RE: Question about using AJAX with Authorize.net
Hi, Jonah... I tried incorporating your code below into my existing AJAX script, but I got the same exact response from the form submission: successful processing (received transaction notification and receipt) and then the AJAX script stops functioning and does process through the "success" function (in my script) or, if I insert your .done function and use it instead of the success function, I get the exact same results. I get this message, either way, in the Firebug console in red letters: "Post https://test.authorize.net/gateway/transact.dll 200 OK 857ms" and at the end of that line, it references "jquery_1.7.1.min.js" as if something in the jquery library isn't setting well with the post. Now, let me make sure I understand: you did mean for me to use your code below apart from cfpayment.cfc, right? (It seems to me, after a closer look at cfpayment, that it's using CFHTTP to post the transaction data to Authorize.net, isn't it? If so, I'm trying to avoid having the server process the post so as to avoid strict PCI compliance for my server. That's why I'm trying to do a direct AJAX post. Here's my full AJAX script with your changes incorporated (after I tried your changes unsuccessfully in the .done function). Do you see anything wrong: $(document).ready(function() { $('#donation_form_submit').click(function() { var x_login = '25F2wqnuFs'; var x_tran_key = '3B58p37d9PJxUUR9'; var x_relay_response= 'false'; var x_type = 'AUTH_CAPTURE'; var x_method= 'CC'; var x_description = 'Donation'; var x_card_num = $('#x_card_num').val(); var x_card_num = x_card_num.replace(/\D/g,''); var x_exp_date = $('#p_cc_exp_month').val()+$('#p_cc_exp_year').val(); var x_amount= $('input[name=x_amount]:checked').val(); var x_first_name= $('#x_first_name').val(); var x_last_name = $('#x_last_name').val(); var x_address = $('#x_address').val(); var x_city = $('#x_city').val(); var x_state = $('#x_state').val(); var x_zip = $('#x_zip').val(); var x_email = $('#x_email').val(); values = { x_login:x_login, x_tran_key: x_tran_key, x_relay_response: x_relay_response, x_type: x_type, x_method: x_method, x_description: x_description, x_card_num: x_card_num, x_exp_date: x_exp_date, x_amount: x_amount, x_first_name: x_first_name, x_last_name:x_last_name, x_address: x_address, x_city: x_city, x_state:x_state, x_zip: x_zip, x_email:x_email } $.ajax ({ cache: false, type: 'post', url: 'https://test.authorize.net/gateway/transact.dll', dataType: 'json', data: values, beforeSend: function() { $('#processing_image').fadeIn(250); $('#processing_text').fadeIn(250); }, success:function(data) { (this alert never works...) -> alert('inside success callback'); var parsedData = data.split('|'); (nothing appears in the console log -> console.log('Data Response:', data, 'Parsed Response:', parsedData); if ( parsedData[0] == 1
Re: Question about using AJAX with Authorize.net
The response string is returned in the callback. Just .split("|") it to get a javascript array. Then do whatever you need to in the response callback. $.ajax({ type: "POST", url: authNetURL, data: { ... } }).done(function( data ) { var parsedData = data.split("|"); console.log( "Data Response:", data, "Parsed Response", parsedData); if (parsedData[0] == 1) alert("SUCCESS\nCode: " + parsedData[0]); else alert("FAILURE\nCode: " + parsedData[0] + "\nReason: " + parsedData[3]); }); This is what the string data looks like coming back: 3|2|33|Credit card number is required.||P|0|||0.00|CC|auth_capture||7A27F022C6CA581165E16ED2D88F2135|| The meanings of the columns returned are in the Authorize.net docs and can also be found starting at line 423 of this file, but remember CF uses 1 based indexes while JS uses 0 based. http://svn.riaforge.org/cfpayment/trunk/api/gateway/authorizenet/authorizenet.cfc On 9/22/12 10:16 PM, Rick Faircloth wrote: > All that's quite beyond me, Jonah. Partly because > I don't make use of the createObject() methodology, > so I don't understand it very well. The other part, is, well, > I just don't understand how to apply everything in the docs. > > I guess I'll just need to talk to Authorize.net on Monday > and see if they know what I need to make this work. I just > don't know how to handle the data they send back; a pipe-delimited > list of all transaction information. > > I'm not sure what it's called. Using CFHTTP, all of that is contained > in cfhttp.fileContent. With that I know how to access the data in > the delimited string they return. > > Using jQuery AJAX to submit my form, I'm not sure what variable > (like filecontent for cfhttp) it would come in so I can reference it. > > Does that make sense? > > Rick ~| 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:352729 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Question about using AJAX with Authorize.net
All that's quite beyond me, Jonah. Partly because I don't make use of the createObject() methodology, so I don't understand it very well. The other part, is, well, I just don't understand how to apply everything in the docs. I guess I'll just need to talk to Authorize.net on Monday and see if they know what I need to make this work. I just don't know how to handle the data they send back; a pipe-delimited list of all transaction information. I'm not sure what it's called. Using CFHTTP, all of that is contained in cfhttp.fileContent. With that I know how to access the data in the delimited string they return. Using jQuery AJAX to submit my form, I'm not sure what variable (like filecontent for cfhttp) it would come in so I can reference it. Does that make sense? Rick -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Sunday, September 23, 2012 12:35 AM To: cf-talk Subject: RE: Question about using AJAX with Authorize.net Thanks for the tip, Jonah... let me check it out. Rick -Original Message- From: .jonah [mailto:jonah@creori.com] Sent: Saturday, September 22, 2012 11:12 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net Wait, you're doing this in CF? Just use the cfpayment library: http://cfpayment.riaforge.org/ or the the good parts of the authorizenet.cfc by itself. On 9/22/12 7:23 PM, Rick Faircloth wrote: > After running a regular form post (no AJAX, no CFHTTP), > I get back all my form values in a pipe-delimited string, > along with Authorize.net's approval code and other transaction > info they return. The submission is a success. I get the > successful email notification, etc. > > However, I'm still not sure how to access the pieces of that > string. What kind of variable is it, if any? Do I need to assign > the string to a variable, then parse it? > > In the typical AJAX I run, I'm sending data to a component method, > and I create a Struct and store variables I'm returning to the > success callback in there, but access them in the AJAX code via > response.WHATEVER. I've tried "response", "fileContent", etc., > trying to figure out how to reference the string that Authorize.net > returns. > > Any more clues anyone? > > Thanks! > > Rick > > > -Original Message- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Saturday, September 22, 2012 6:05 PM > To: cf-talk > Subject: RE: Question about using AJAX with Authorize.net > > > Looking at the sample CF code, which posts via CFHTTP, > this is how the post response gets handled: > > - > > > > > > > > > > > > > > > > > > -- > > From that code, I get a list of all the data coming back, but I couldn't use > the structure, > "filecontent" to access any field of data. Maybe I should try > "filecontent[1]" or something. > > I made the following changes, just to see if I could access the field data > in the response: > > > > Thank you for your donation to USO Tampa Bay. > > > > > This donation has been made in memory of > #response_array[69]#. > > > And that works. response_array[69] is the first name of the person the > donation is sent > in honor of. > > I tried using "filecontent" as the structure containing all the responses, > which is the > first thing I see in the CF code above, "cfhttp.filecontent". But that > didn't work... is the > "filecontent" part of that specific to a cfhttp post? > > I thought I'd mention this code before writing up a regular post to > Authorize.net. > > Does this help figure out the structure the code is being returned in? > > Rick > > > > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Saturday, September 22, 2012 5:40 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > you need to take ajax out of the loop and do a regular http post, and then > look at the response that comes back, then you will see what variables they > are sending you and you can then adjust your ajax code accordinly > > On Sat, Sep 22, 2012 at 10:22 PM, Rick Faircloth > wrote: > >> Judah... (or anyone else...) >> >> I'm running successful transactions to Authorize.net from >> my form using AJAX to post that data to Authorize.net.
RE: Question about using AJAX with Authorize.net
Thanks for the tip, Jonah... let me check it out. Rick -Original Message- From: .jonah [mailto:jonah@creori.com] Sent: Saturday, September 22, 2012 11:12 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net Wait, you're doing this in CF? Just use the cfpayment library: http://cfpayment.riaforge.org/ or the the good parts of the authorizenet.cfc by itself. On 9/22/12 7:23 PM, Rick Faircloth wrote: > After running a regular form post (no AJAX, no CFHTTP), > I get back all my form values in a pipe-delimited string, > along with Authorize.net's approval code and other transaction > info they return. The submission is a success. I get the > successful email notification, etc. > > However, I'm still not sure how to access the pieces of that > string. What kind of variable is it, if any? Do I need to assign > the string to a variable, then parse it? > > In the typical AJAX I run, I'm sending data to a component method, > and I create a Struct and store variables I'm returning to the > success callback in there, but access them in the AJAX code via > response.WHATEVER. I've tried "response", "fileContent", etc., > trying to figure out how to reference the string that Authorize.net > returns. > > Any more clues anyone? > > Thanks! > > Rick > > > -Original Message- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Saturday, September 22, 2012 6:05 PM > To: cf-talk > Subject: RE: Question about using AJAX with Authorize.net > > > Looking at the sample CF code, which posts via CFHTTP, > this is how the post response gets handled: > > - > > > > > > > > > > > > > > > > > > -- > > From that code, I get a list of all the data coming back, but I couldn't use > the structure, > "filecontent" to access any field of data. Maybe I should try > "filecontent[1]" or something. > > I made the following changes, just to see if I could access the field data > in the response: > > > > Thank you for your donation to USO Tampa Bay. > > > > > This donation has been made in memory of > #response_array[69]#. > > > And that works. response_array[69] is the first name of the person the > donation is sent > in honor of. > > I tried using "filecontent" as the structure containing all the responses, > which is the > first thing I see in the CF code above, "cfhttp.filecontent". But that > didn't work... is the > "filecontent" part of that specific to a cfhttp post? > > I thought I'd mention this code before writing up a regular post to > Authorize.net. > > Does this help figure out the structure the code is being returned in? > > Rick > > > > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Saturday, September 22, 2012 5:40 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > you need to take ajax out of the loop and do a regular http post, and then > look at the response that comes back, then you will see what variables they > are sending you and you can then adjust your ajax code accordinly > > On Sat, Sep 22, 2012 at 10:22 PM, Rick Faircloth > wrote: > >> Judah... (or anyone else...) >> >> I'm running successful transactions to Authorize.net from >> my form using AJAX to post that data to Authorize.net. >> >> I know the transactions are successful, because I'm getting >> Customer Receipts (to myself) and Merchant Receipts (again >> to myself). However, in the "success" part of my AJAX code, >> I don't know how to access the data/response that Authorize.net >> is sending back. My AJAX routine processes and submits the >> transaction info, then displays the "Processing..." message >> and the page sits there, because I don't know how to check >> for the "This transaction has been approved." code. I'm not >> sure what variable/array to check. >> >> What variable should I test to make sure the transaction was >> successful in the AJAX callback? The only ColdFusion documentation >> I could find doesn't involve AJAX and just uses CFHTTP, which >> I want to avoid to simply PCI compliance. (However, I will be >> running server-side validation of the data, including c
Re: Question about using AJAX with Authorize.net
Wait, you're doing this in CF? Just use the cfpayment library: http://cfpayment.riaforge.org/ or the the good parts of the authorizenet.cfc by itself. On 9/22/12 7:23 PM, Rick Faircloth wrote: > After running a regular form post (no AJAX, no CFHTTP), > I get back all my form values in a pipe-delimited string, > along with Authorize.net's approval code and other transaction > info they return. The submission is a success. I get the > successful email notification, etc. > > However, I'm still not sure how to access the pieces of that > string. What kind of variable is it, if any? Do I need to assign > the string to a variable, then parse it? > > In the typical AJAX I run, I'm sending data to a component method, > and I create a Struct and store variables I'm returning to the > success callback in there, but access them in the AJAX code via > response.WHATEVER. I've tried "response", "fileContent", etc., > trying to figure out how to reference the string that Authorize.net > returns. > > Any more clues anyone? > > Thanks! > > Rick > > > -Original Message- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Saturday, September 22, 2012 6:05 PM > To: cf-talk > Subject: RE: Question about using AJAX with Authorize.net > > > Looking at the sample CF code, which posts via CFHTTP, > this is how the post response gets handled: > > - > > > > > > > > > > > > > > > > > > -- > > From that code, I get a list of all the data coming back, but I couldn't use > the structure, > "filecontent" to access any field of data. Maybe I should try > "filecontent[1]" or something. > > I made the following changes, just to see if I could access the field data > in the response: > > > > Thank you for your donation to USO Tampa Bay. > > > > > This donation has been made in memory of > #response_array[69]#. > > > And that works. response_array[69] is the first name of the person the > donation is sent > in honor of. > > I tried using "filecontent" as the structure containing all the responses, > which is the > first thing I see in the CF code above, "cfhttp.filecontent". But that > didn't work... is the > "filecontent" part of that specific to a cfhttp post? > > I thought I'd mention this code before writing up a regular post to > Authorize.net. > > Does this help figure out the structure the code is being returned in? > > Rick > > > > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Saturday, September 22, 2012 5:40 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > you need to take ajax out of the loop and do a regular http post, and then > look at the response that comes back, then you will see what variables they > are sending you and you can then adjust your ajax code accordinly > > On Sat, Sep 22, 2012 at 10:22 PM, Rick Faircloth > wrote: > >> Judah... (or anyone else...) >> >> I'm running successful transactions to Authorize.net from >> my form using AJAX to post that data to Authorize.net. >> >> I know the transactions are successful, because I'm getting >> Customer Receipts (to myself) and Merchant Receipts (again >> to myself). However, in the "success" part of my AJAX code, >> I don't know how to access the data/response that Authorize.net >> is sending back. My AJAX routine processes and submits the >> transaction info, then displays the "Processing..." message >> and the page sits there, because I don't know how to check >> for the "This transaction has been approved." code. I'm not >> sure what variable/array to check. >> >> What variable should I test to make sure the transaction was >> successful in the AJAX callback? The only ColdFusion documentation >> I could find doesn't involve AJAX and just uses CFHTTP, which >> I want to avoid to simply PCI compliance. (However, I will be >> running server-side validation of the data, including credit >> card numbers, to make sure one's been entered and is in the >> correct format... does that mean I've now passed the data to my >> server and causes me to have to be as stringent about PCI >> compliance as
RE: Question about using AJAX with Authorize.net
After running a regular form post (no AJAX, no CFHTTP), I get back all my form values in a pipe-delimited string, along with Authorize.net's approval code and other transaction info they return. The submission is a success. I get the successful email notification, etc. However, I'm still not sure how to access the pieces of that string. What kind of variable is it, if any? Do I need to assign the string to a variable, then parse it? In the typical AJAX I run, I'm sending data to a component method, and I create a Struct and store variables I'm returning to the success callback in there, but access them in the AJAX code via response.WHATEVER. I've tried "response", "fileContent", etc., trying to figure out how to reference the string that Authorize.net returns. Any more clues anyone? Thanks! Rick -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Saturday, September 22, 2012 6:05 PM To: cf-talk Subject: RE: Question about using AJAX with Authorize.net Looking at the sample CF code, which posts via CFHTTP, this is how the post response gets handled: - -- >From that code, I get a list of all the data coming back, but I couldn't use the structure, "filecontent" to access any field of data. Maybe I should try "filecontent[1]" or something. I made the following changes, just to see if I could access the field data in the response: Thank you for your donation to USO Tampa Bay. This donation has been made in memory of #response_array[69]#. And that works. response_array[69] is the first name of the person the donation is sent in honor of. I tried using "filecontent" as the structure containing all the responses, which is the first thing I see in the CF code above, "cfhttp.filecontent". But that didn't work... is the "filecontent" part of that specific to a cfhttp post? I thought I'd mention this code before writing up a regular post to Authorize.net. Does this help figure out the structure the code is being returned in? Rick -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Saturday, September 22, 2012 5:40 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net you need to take ajax out of the loop and do a regular http post, and then look at the response that comes back, then you will see what variables they are sending you and you can then adjust your ajax code accordinly On Sat, Sep 22, 2012 at 10:22 PM, Rick Faircloth wrote: > > Judah... (or anyone else...) > > I'm running successful transactions to Authorize.net from > my form using AJAX to post that data to Authorize.net. > > I know the transactions are successful, because I'm getting > Customer Receipts (to myself) and Merchant Receipts (again > to myself). However, in the "success" part of my AJAX code, > I don't know how to access the data/response that Authorize.net > is sending back. My AJAX routine processes and submits the > transaction info, then displays the "Processing..." message > and the page sits there, because I don't know how to check > for the "This transaction has been approved." code. I'm not > sure what variable/array to check. > > What variable should I test to make sure the transaction was > successful in the AJAX callback? The only ColdFusion documentation > I could find doesn't involve AJAX and just uses CFHTTP, which > I want to avoid to simply PCI compliance. (However, I will be > running server-side validation of the data, including credit > card numbers, to make sure one's been entered and is in the > correct format... does that mean I've now passed the data to my > server and causes me to have to be as stringent about PCI > compliance as if I were using CFHTTP to post to Authorize.net > in the first place, instead of AJAX? > > Thanks for any feedback! > > Rick > > > > -Original Message- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Tuesday, September 18, 2012 6:37 PM > To: cf-talk > Subject: RE: Question about using AJAX with Authorize.net > > > Thanks for the perspective, Juday... > > My plan is to run client-side validation via Javascript when info is > being entered into the form, then validate with CF in a cfc method > once the form passes Javascript validation and return any errors > that CF picks up. Usually, there aren't any CF errors if JS didn't > find any in t
RE: Question about using AJAX with Authorize.net
Looking at the sample CF code, which posts via CFHTTP, this is how the post response gets handled: - -- >From that code, I get a list of all the data coming back, but I couldn't use the structure, "filecontent" to access any field of data. Maybe I should try "filecontent[1]" or something. I made the following changes, just to see if I could access the field data in the response: Thank you for your donation to USO Tampa Bay. This donation has been made in memory of #response_array[69]#. And that works. response_array[69] is the first name of the person the donation is sent in honor of. I tried using "filecontent" as the structure containing all the responses, which is the first thing I see in the CF code above, "cfhttp.filecontent". But that didn't work... is the "filecontent" part of that specific to a cfhttp post? I thought I'd mention this code before writing up a regular post to Authorize.net. Does this help figure out the structure the code is being returned in? Rick -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Saturday, September 22, 2012 5:40 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net you need to take ajax out of the loop and do a regular http post, and then look at the response that comes back, then you will see what variables they are sending you and you can then adjust your ajax code accordinly On Sat, Sep 22, 2012 at 10:22 PM, Rick Faircloth wrote: > > Judah... (or anyone else...) > > I'm running successful transactions to Authorize.net from > my form using AJAX to post that data to Authorize.net. > > I know the transactions are successful, because I'm getting > Customer Receipts (to myself) and Merchant Receipts (again > to myself). However, in the "success" part of my AJAX code, > I don't know how to access the data/response that Authorize.net > is sending back. My AJAX routine processes and submits the > transaction info, then displays the "Processing..." message > and the page sits there, because I don't know how to check > for the "This transaction has been approved." code. I'm not > sure what variable/array to check. > > What variable should I test to make sure the transaction was > successful in the AJAX callback? The only ColdFusion documentation > I could find doesn't involve AJAX and just uses CFHTTP, which > I want to avoid to simply PCI compliance. (However, I will be > running server-side validation of the data, including credit > card numbers, to make sure one's been entered and is in the > correct format... does that mean I've now passed the data to my > server and causes me to have to be as stringent about PCI > compliance as if I were using CFHTTP to post to Authorize.net > in the first place, instead of AJAX? > > Thanks for any feedback! > > Rick > > > > -Original Message- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Tuesday, September 18, 2012 6:37 PM > To: cf-talk > Subject: RE: Question about using AJAX with Authorize.net > > > Thanks for the perspective, Juday... > > My plan is to run client-side validation via Javascript when info is > being entered into the form, then validate with CF in a cfc method > once the form passes Javascript validation and return any errors > that CF picks up. Usually, there aren't any CF errors if JS didn't > find any in the form data, since I program CF to validate the same > way the JS does. > > You mentioned the transaction key and password. I'll provide that data > in the JS processing and assign the values there before submitting > the data via AJAX. Would that be secure? > > Rick > > > -Original Message- > From: Judah McAuley [mailto:ju...@wiredotter.com] > Sent: Tuesday, September 18, 2012 5:54 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > Ah, gotcha. The key there is definitely the "merchant defined" fields. > They do not want you to send them personally defined information that > they then post back to you (the x_ fields that you mentioned). > > I think you are on target with your ajax option. The other option is > to post back to your server, capture the response in memory (just the > Form collection), do a cfhttp post to Auth.net to do the transaction > with the subset of information they need and then redirect to the > re
Re: Question about using AJAX with Authorize.net
you need to take ajax out of the loop and do a regular http post, and then look at the response that comes back, then you will see what variables they are sending you and you can then adjust your ajax code accordinly On Sat, Sep 22, 2012 at 10:22 PM, Rick Faircloth wrote: > > Judah... (or anyone else...) > > I'm running successful transactions to Authorize.net from > my form using AJAX to post that data to Authorize.net. > > I know the transactions are successful, because I'm getting > Customer Receipts (to myself) and Merchant Receipts (again > to myself). However, in the "success" part of my AJAX code, > I don't know how to access the data/response that Authorize.net > is sending back. My AJAX routine processes and submits the > transaction info, then displays the "Processing..." message > and the page sits there, because I don't know how to check > for the "This transaction has been approved." code. I'm not > sure what variable/array to check. > > What variable should I test to make sure the transaction was > successful in the AJAX callback? The only ColdFusion documentation > I could find doesn't involve AJAX and just uses CFHTTP, which > I want to avoid to simply PCI compliance. (However, I will be > running server-side validation of the data, including credit > card numbers, to make sure one's been entered and is in the > correct format... does that mean I've now passed the data to my > server and causes me to have to be as stringent about PCI > compliance as if I were using CFHTTP to post to Authorize.net > in the first place, instead of AJAX? > > Thanks for any feedback! > > Rick > > > > -Original Message- > From: Rick Faircloth [mailto:r...@whitestonemedia.com] > Sent: Tuesday, September 18, 2012 6:37 PM > To: cf-talk > Subject: RE: Question about using AJAX with Authorize.net > > > Thanks for the perspective, Juday... > > My plan is to run client-side validation via Javascript when info is > being entered into the form, then validate with CF in a cfc method > once the form passes Javascript validation and return any errors > that CF picks up. Usually, there aren't any CF errors if JS didn't > find any in the form data, since I program CF to validate the same > way the JS does. > > You mentioned the transaction key and password. I'll provide that data > in the JS processing and assign the values there before submitting > the data via AJAX. Would that be secure? > > Rick > > > -Original Message- > From: Judah McAuley [mailto:ju...@wiredotter.com] > Sent: Tuesday, September 18, 2012 5:54 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > Ah, gotcha. The key there is definitely the "merchant defined" fields. > They do not want you to send them personally defined information that > they then post back to you (the x_ fields that you mentioned). > > I think you are on target with your ajax option. The other option is > to post back to your server, capture the response in memory (just the > Form collection), do a cfhttp post to Auth.net to do the transaction > with the subset of information they need and then redirect to the > receipt page (if successful) or back to the submission page if the > transaction errors. This is what I've done in the past and it allows > you to do the server side validation and any custom processing. > > The downside to this method is that it carries a higher PCI compliance > because the CC details are transmitted to your server even if they are > never stored anywhere other than memory. If you use Ajax calls > directly from the client-side form, you can avoid some of the PCI > compliance stuff because the information never hits your server. > However, you would have to include the transaction key and password in > your client-side form at that point which makes that information > publicly available. Off the top of my head, the only thing I can think > of that that would do is make it so that other people could charge > credit cards and give you money from them but there may be other > attack vectors that aren't obvious to me right away. If you bypassed > client-side validation, maybe you could charge a negative number and > refund money to the card? Probably not, but it would warrant > investigation at the very least. I would also think that the fact that > the client side would be doing the HTTP call would mean that you could > set up a Hosts file entry for the Auth.net gateway and provide a reply > on the client side that said it was successful and then your page > would submit back to you assuming that the call was successful and > therefor
RE: Question about using AJAX with Authorize.net
Judah... (or anyone else...) I'm running successful transactions to Authorize.net from my form using AJAX to post that data to Authorize.net. I know the transactions are successful, because I'm getting Customer Receipts (to myself) and Merchant Receipts (again to myself). However, in the "success" part of my AJAX code, I don't know how to access the data/response that Authorize.net is sending back. My AJAX routine processes and submits the transaction info, then displays the "Processing..." message and the page sits there, because I don't know how to check for the "This transaction has been approved." code. I'm not sure what variable/array to check. What variable should I test to make sure the transaction was successful in the AJAX callback? The only ColdFusion documentation I could find doesn't involve AJAX and just uses CFHTTP, which I want to avoid to simply PCI compliance. (However, I will be running server-side validation of the data, including credit card numbers, to make sure one's been entered and is in the correct format... does that mean I've now passed the data to my server and causes me to have to be as stringent about PCI compliance as if I were using CFHTTP to post to Authorize.net in the first place, instead of AJAX? Thanks for any feedback! Rick -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Tuesday, September 18, 2012 6:37 PM To: cf-talk Subject: RE: Question about using AJAX with Authorize.net Thanks for the perspective, Juday... My plan is to run client-side validation via Javascript when info is being entered into the form, then validate with CF in a cfc method once the form passes Javascript validation and return any errors that CF picks up. Usually, there aren't any CF errors if JS didn't find any in the form data, since I program CF to validate the same way the JS does. You mentioned the transaction key and password. I'll provide that data in the JS processing and assign the values there before submitting the data via AJAX. Would that be secure? Rick -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Tuesday, September 18, 2012 5:54 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net Ah, gotcha. The key there is definitely the "merchant defined" fields. They do not want you to send them personally defined information that they then post back to you (the x_ fields that you mentioned). I think you are on target with your ajax option. The other option is to post back to your server, capture the response in memory (just the Form collection), do a cfhttp post to Auth.net to do the transaction with the subset of information they need and then redirect to the receipt page (if successful) or back to the submission page if the transaction errors. This is what I've done in the past and it allows you to do the server side validation and any custom processing. The downside to this method is that it carries a higher PCI compliance because the CC details are transmitted to your server even if they are never stored anywhere other than memory. If you use Ajax calls directly from the client-side form, you can avoid some of the PCI compliance stuff because the information never hits your server. However, you would have to include the transaction key and password in your client-side form at that point which makes that information publicly available. Off the top of my head, the only thing I can think of that that would do is make it so that other people could charge credit cards and give you money from them but there may be other attack vectors that aren't obvious to me right away. If you bypassed client-side validation, maybe you could charge a negative number and refund money to the card? Probably not, but it would warrant investigation at the very least. I would also think that the fact that the client side would be doing the HTTP call would mean that you could set up a Hosts file entry for the Auth.net gateway and provide a reply on the client side that said it was successful and then your page would submit back to you assuming that the call was successful and therefore allow them to fake a transaction. I don't know if that is important in your situation or not, but fundamentally, I do no trust validation that is only performed on a machine I do not control. Cheers, Judah On Tue, Sep 18, 2012 at 2:25 PM, Rick Faircloth wrote: > > Thanks, everyone, for the comments... > > Judah, I'm using the Advanced Integration Method (AIM), > since I'm hosting my own form. > > Here's what I'm referring to in the Authorize.net info > about personally identifying information: > > From the Advanced Integration Method docs: > > -- > > Merchant-defined data
RE: Question about using AJAX with Authorize.net
Thanks, Rob... I'll do that once I have the application running fully in their sandbox testing area. Hopefully, they can pick up any flaws. This donation form is for a large organization and I would hate to cause any security problems and compromise the system or donors' info. Rick -Original Message- From: Rob Voyle [mailto:robvo...@voyle.com] Sent: Tuesday, September 18, 2012 6:35 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net Hi rick I take this to mean anything downstream of their portal, but surely anything upstream on your server and your form is "yours". If you do have any concerns I would call authorize.Net tech support. I have found them to be very helpful. rob Robert J. Voyle, Psy.D. Director, Clergy Leadership Institute For Coaching and Training in Appreciative Inquiry Author: Restoring Hope: Appreciative Strategies to Resolve Grief and Resentment http://www.appreciativeway.com/ 503-647-2378 or 503-647-2382 On 18 Sep 2012 at 17:25, Rick Faircloth wrote: > From the Advanced Integration Method docs: > Merchant-defined data fields are not intended to and must not be > used > to capture personally identifying information. Accordingly, the > merchant > is prohibited from capturing, obtaining, and/or transmitting any > personally identifying information in or by means of the > merchant-defined > data fields. Personally identifying information includes, but is not > limited > to, > name, address, credit card number, social security number, driver's > license > number, > state-issued identification number, passport number, and card > verification > numbers > (CVV, CVC2, CVV2, CID, CVN). If Authorize.Net discovers that the > merchant is > capturing and/or transmitting personally identifying information by > means of > the merchant-defined data fields, whether or not intentionally, > CyberSource > will immediately suspend the merchant's account, which will result > in a > rejection > of any and all transaction requests submitted by the merchant after > the > point of suspension. > ~| 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:352668 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Question about using AJAX with Authorize.net
Thanks for the perspective, Juday... My plan is to run client-side validation via Javascript when info is being entered into the form, then validate with CF in a cfc method once the form passes Javascript validation and return any errors that CF picks up. Usually, there aren't any CF errors if JS didn't find any in the form data, since I program CF to validate the same way the JS does. You mentioned the transaction key and password. I'll provide that data in the JS processing and assign the values there before submitting the data via AJAX. Would that be secure? Rick -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Tuesday, September 18, 2012 5:54 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net Ah, gotcha. The key there is definitely the "merchant defined" fields. They do not want you to send them personally defined information that they then post back to you (the x_ fields that you mentioned). I think you are on target with your ajax option. The other option is to post back to your server, capture the response in memory (just the Form collection), do a cfhttp post to Auth.net to do the transaction with the subset of information they need and then redirect to the receipt page (if successful) or back to the submission page if the transaction errors. This is what I've done in the past and it allows you to do the server side validation and any custom processing. The downside to this method is that it carries a higher PCI compliance because the CC details are transmitted to your server even if they are never stored anywhere other than memory. If you use Ajax calls directly from the client-side form, you can avoid some of the PCI compliance stuff because the information never hits your server. However, you would have to include the transaction key and password in your client-side form at that point which makes that information publicly available. Off the top of my head, the only thing I can think of that that would do is make it so that other people could charge credit cards and give you money from them but there may be other attack vectors that aren't obvious to me right away. If you bypassed client-side validation, maybe you could charge a negative number and refund money to the card? Probably not, but it would warrant investigation at the very least. I would also think that the fact that the client side would be doing the HTTP call would mean that you could set up a Hosts file entry for the Auth.net gateway and provide a reply on the client side that said it was successful and then your page would submit back to you assuming that the call was successful and therefore allow them to fake a transaction. I don't know if that is important in your situation or not, but fundamentally, I do no trust validation that is only performed on a machine I do not control. Cheers, Judah On Tue, Sep 18, 2012 at 2:25 PM, Rick Faircloth wrote: > > Thanks, everyone, for the comments... > > Judah, I'm using the Advanced Integration Method (AIM), > since I'm hosting my own form. > > Here's what I'm referring to in the Authorize.net info > about personally identifying information: > > From the Advanced Integration Method docs: > > -- > > Merchant-defined data fields are not intended to and must not be used > to capture personally identifying information. Accordingly, the merchant > is prohibited from capturing, obtaining, and/or transmitting any > personally identifying information in or by means of the merchant-defined > data fields. Personally identifying information includes, but is not limited > to, > name, address, credit card number, social security number, driver's license > number, > state-issued identification number, passport number, and card verification > numbers > (CVV, CVC2, CVV2, CID, CVN). If Authorize.Net discovers that the merchant is > capturing and/or transmitting personally identifying information by means of > the merchant-defined data fields, whether or not intentionally, CyberSource > will immediately suspend the merchant's account, which will result in a > rejection > of any and all transaction requests submitted by the merchant after the > point of suspension. > > -- > > That seems clear to me, that in the AIM method, I can't use the > "merchant-defined" > x_ fields to capture any of the info mentioned above. > > My plan was just to send to them what they require for the processing and > use > the other fields from the form for the in-house emailing, thank-you's, "in > honor of", > "in memory of", etc., data. I don't think that kind of data can go through
Re: Question about using AJAX with Authorize.net
Hi rick I take this to mean anything downstream of their portal, but surely anything upstream on your server and your form is "yours". If you do have any concerns I would call authorize.Net tech support. I have found them to be very helpful. rob Robert J. Voyle, Psy.D. Director, Clergy Leadership Institute For Coaching and Training in Appreciative Inquiry Author: Restoring Hope: Appreciative Strategies to Resolve Grief and Resentment http://www.appreciativeway.com/ 503-647-2378 or 503-647-2382 On 18 Sep 2012 at 17:25, Rick Faircloth wrote: > From the Advanced Integration Method docs: > Merchant-defined data fields are not intended to and must not be > used > to capture personally identifying information. Accordingly, the > merchant > is prohibited from capturing, obtaining, and/or transmitting any > personally identifying information in or by means of the > merchant-defined > data fields. Personally identifying information includes, but is not > limited > to, > name, address, credit card number, social security number, driver's > license > number, > state-issued identification number, passport number, and card > verification > numbers > (CVV, CVC2, CVV2, CID, CVN). If Authorize.Net discovers that the > merchant is > capturing and/or transmitting personally identifying information by > means of > the merchant-defined data fields, whether or not intentionally, > CyberSource > will immediately suspend the merchant's account, which will result > in a > rejection > of any and all transaction requests submitted by the merchant after > the > point of suspension. > ~| 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:352666 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using AJAX with Authorize.net
Ah, gotcha. The key there is definitely the "merchant defined" fields. They do not want you to send them personally defined information that they then post back to you (the x_ fields that you mentioned). I think you are on target with your ajax option. The other option is to post back to your server, capture the response in memory (just the Form collection), do a cfhttp post to Auth.net to do the transaction with the subset of information they need and then redirect to the receipt page (if successful) or back to the submission page if the transaction errors. This is what I've done in the past and it allows you to do the server side validation and any custom processing. The downside to this method is that it carries a higher PCI compliance because the CC details are transmitted to your server even if they are never stored anywhere other than memory. If you use Ajax calls directly from the client-side form, you can avoid some of the PCI compliance stuff because the information never hits your server. However, you would have to include the transaction key and password in your client-side form at that point which makes that information publicly available. Off the top of my head, the only thing I can think of that that would do is make it so that other people could charge credit cards and give you money from them but there may be other attack vectors that aren't obvious to me right away. If you bypassed client-side validation, maybe you could charge a negative number and refund money to the card? Probably not, but it would warrant investigation at the very least. I would also think that the fact that the client side would be doing the HTTP call would mean that you could set up a Hosts file entry for the Auth.net gateway and provide a reply on the client side that said it was successful and then your page would submit back to you assuming that the call was successful and therefore allow them to fake a transaction. I don't know if that is important in your situation or not, but fundamentally, I do no trust validation that is only performed on a machine I do not control. Cheers, Judah On Tue, Sep 18, 2012 at 2:25 PM, Rick Faircloth wrote: > > Thanks, everyone, for the comments... > > Judah, I'm using the Advanced Integration Method (AIM), > since I'm hosting my own form. > > Here's what I'm referring to in the Authorize.net info > about personally identifying information: > > From the Advanced Integration Method docs: > > -- > > Merchant-defined data fields are not intended to and must not be used > to capture personally identifying information. Accordingly, the merchant > is prohibited from capturing, obtaining, and/or transmitting any > personally identifying information in or by means of the merchant-defined > data fields. Personally identifying information includes, but is not limited > to, > name, address, credit card number, social security number, driver's license > number, > state-issued identification number, passport number, and card verification > numbers > (CVV, CVC2, CVV2, CID, CVN). If Authorize.Net discovers that the merchant is > capturing and/or transmitting personally identifying information by means of > the merchant-defined data fields, whether or not intentionally, CyberSource > will immediately suspend the merchant's account, which will result in a > rejection > of any and all transaction requests submitted by the merchant after the > point of suspension. > > -- > > That seems clear to me, that in the AIM method, I can't use the > "merchant-defined" > x_ fields to capture any of the info mentioned above. > > My plan was just to send to them what they require for the processing and > use > the other fields from the form for the in-house emailing, thank-you's, "in > honor of", > "in memory of", etc., data. I don't think that kind of data can go through > Authorize.net's server and back to me. > > Rick > > > > -Original Message- > From: Judah McAuley [mailto:ju...@wiredotter.com] > Sent: Tuesday, September 18, 2012 3:31 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > You have to send Auth.net personally identifying information in order > to use AVS (the address verification service), so I know they don't > forbid that. Maybe it depends on the integration method you are using. > Are you doing the simple integration method where you send the user to > auth.net and then they come back or are you using a behind the scenes > post to their api to do the auth? > > Judah > > On Tue, Sep 18, 2012 at 10:40 AM, Rick Fairc
RE: Question about using AJAX with Authorize.net
Thanks, everyone, for the comments... Judah, I'm using the Advanced Integration Method (AIM), since I'm hosting my own form. Here's what I'm referring to in the Authorize.net info about personally identifying information: >From the Advanced Integration Method docs: -- Merchant-defined data fields are not intended to and must not be used to capture personally identifying information. Accordingly, the merchant is prohibited from capturing, obtaining, and/or transmitting any personally identifying information in or by means of the merchant-defined data fields. Personally identifying information includes, but is not limited to, name, address, credit card number, social security number, driver's license number, state-issued identification number, passport number, and card verification numbers (CVV, CVC2, CVV2, CID, CVN). If Authorize.Net discovers that the merchant is capturing and/or transmitting personally identifying information by means of the merchant-defined data fields, whether or not intentionally, CyberSource will immediately suspend the merchant's account, which will result in a rejection of any and all transaction requests submitted by the merchant after the point of suspension. -- That seems clear to me, that in the AIM method, I can't use the "merchant-defined" x_ fields to capture any of the info mentioned above. My plan was just to send to them what they require for the processing and use the other fields from the form for the in-house emailing, thank-you's, "in honor of", "in memory of", etc., data. I don't think that kind of data can go through Authorize.net's server and back to me. Rick -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Tuesday, September 18, 2012 3:31 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net You have to send Auth.net personally identifying information in order to use AVS (the address verification service), so I know they don't forbid that. Maybe it depends on the integration method you are using. Are you doing the simple integration method where you send the user to auth.net and then they come back or are you using a behind the scenes post to their api to do the auth? Judah On Tue, Sep 18, 2012 at 10:40 AM, Rick Faircloth wrote: > > I'm implementing my first donation form using Authorize.net. > > I've found in their fine-print that I cannot submit any personally > identifiable information to their servers. > > We have a form which includes personally identifiable information > for emailing thank-you's, etc. > > Therefore, I'm planning to implement an AJAX solution to > intercept the formfield data that is applicable to the transaction > and is required by Authorize.net and submit that via AJAX to a method > in a cfc, which will send the pertinent data to Authorize.net. > > In the success section of the AJAX solution to Authorize.net, I'll > implement a further submission of the rest of the form data (the > personally identifiable information) to another method in a cfc, > which will process that data for in-house (non-Authorize.net) use. > (Or something similar to this process...) > > Any warnings, cautions, or gotcha's in this approach? > > Thanks for any feedback! > > Rick > > > > ~| 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:352664 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using AJAX with Authorize.net
You have to send Auth.net personally identifying information in order to use AVS (the address verification service), so I know they don't forbid that. Maybe it depends on the integration method you are using. Are you doing the simple integration method where you send the user to auth.net and then they come back or are you using a behind the scenes post to their api to do the auth? Judah On Tue, Sep 18, 2012 at 10:40 AM, Rick Faircloth wrote: > > I'm implementing my first donation form using Authorize.net. > > I've found in their fine-print that I cannot submit any personally > identifiable information to their servers. > > We have a form which includes personally identifiable information > for emailing thank-you's, etc. > > Therefore, I'm planning to implement an AJAX solution to > intercept the formfield data that is applicable to the transaction > and is required by Authorize.net and submit that via AJAX to a method > in a cfc, which will send the pertinent data to Authorize.net. > > In the success section of the AJAX solution to Authorize.net, I'll > implement a further submission of the rest of the form data (the > personally identifiable information) to another method in a cfc, > which will process that data for in-house (non-Authorize.net) use. > (Or something similar to this process...) > > Any warnings, cautions, or gotcha's in this approach? > > Thanks for any feedback! > > Rick > > > > ~| 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:352662 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using AJAX with Authorize.net
Hi Rick I use authorize.net and i can submit all sorts of personal information, name address email address etc. in the "x_variable" customer information. perhaps I am not sure what information you are suggesting However i do what Russ suggests, I submit the information for processing as a cfinclude in my submission form and when it is approved, use the approval to trigger my own emails from my server, both to the customer and to the fulfilment service. Rob Robert J. Voyle, Psy.D. Director, Clergy Leadership Institute For Coaching and Training in Appreciative Inquiry Author: Restoring Hope: Appreciative Strategies to Resolve Grief and Resentment http://www.appreciativeway.com/ 503-647-2378 or 503-647-2382 On 18 Sep 2012 at 13:40, Rick Faircloth wrote: > > I'm implementing my first donation form using Authorize.net. ~| 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:352661 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using AJAX with Authorize.net
you send a unique transactionID along, which they then send back to you on the callback, which identifies the user, so you can send them the thank you email. You On Tue, Sep 18, 2012 at 7:11 PM, Rick Faircloth wrote: > > I work so much using AJAX I may not be able to see the forest > for the trees. > > Without using AJAX and using its success callback function, > how else will I "send (my) thank you email after they are redirected > back to (my) site" ? My first thought is to use the AJAX success > callback as the means by which I'll call another method to send > a thank-you email, store info in the database (not cc info), etc. > > Is there a simpler way? Besides an AJAX submission and callback, > how else will I continue processing info? Call another CFC method > to further process form data from the re-direct page? And if the > page that Authorize.net redirects to is a "Thank-You" page, then > the form variables will have to be saved as session variables to > further process the original form variables for emailing, database > storage of info, etc correct? > > Rick > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Tuesday, September 18, 2012 1:48 PM > To: cf-talk > Subject: Re: Question about using AJAX with Authorize.net > > > well it depends how you process. > if you redirect to authorize.net and then come back to your site, then why > not simply send your thank you email after they are redirected back to your > site, this is how most folks do it. The ajax stuff seems a bit overkill. > If your processing serverside, then you simply need to wait till you get > the response back from your CFHTTP call. > > > > On Tue, Sep 18, 2012 at 6:40 PM, Rick Faircloth > wrote: > > > > > I'm implementing my first donation form using Authorize.net. > > > > I've found in their fine-print that I cannot submit any personally > > identifiable information to their servers. > > > > We have a form which includes personally identifiable information > > for emailing thank-you's, etc. > > > > Therefore, I'm planning to implement an AJAX solution to > > intercept the formfield data that is applicable to the transaction > > and is required by Authorize.net and submit that via AJAX to a method > > in a cfc, which will send the pertinent data to Authorize.net. > > > > In the success section of the AJAX solution to Authorize.net, I'll > > implement a further submission of the rest of the form data (the > > personally identifiable information) to another method in a cfc, > > which will process that data for in-house (non-Authorize.net) use. > > (Or something similar to this process...) > > > > Any warnings, cautions, or gotcha's in this approach? > > > > Thanks for any feedback! > > > > Rick > > > > > > > > > > > > ~| 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:352660 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Question about using AJAX with Authorize.net
I work so much using AJAX I may not be able to see the forest for the trees. Without using AJAX and using its success callback function, how else will I "send (my) thank you email after they are redirected back to (my) site" ? My first thought is to use the AJAX success callback as the means by which I'll call another method to send a thank-you email, store info in the database (not cc info), etc. Is there a simpler way? Besides an AJAX submission and callback, how else will I continue processing info? Call another CFC method to further process form data from the re-direct page? And if the page that Authorize.net redirects to is a "Thank-You" page, then the form variables will have to be saved as session variables to further process the original form variables for emailing, database storage of info, etc correct? Rick -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Tuesday, September 18, 2012 1:48 PM To: cf-talk Subject: Re: Question about using AJAX with Authorize.net well it depends how you process. if you redirect to authorize.net and then come back to your site, then why not simply send your thank you email after they are redirected back to your site, this is how most folks do it. The ajax stuff seems a bit overkill. If your processing serverside, then you simply need to wait till you get the response back from your CFHTTP call. On Tue, Sep 18, 2012 at 6:40 PM, Rick Faircloth wrote: > > I'm implementing my first donation form using Authorize.net. > > I've found in their fine-print that I cannot submit any personally > identifiable information to their servers. > > We have a form which includes personally identifiable information > for emailing thank-you's, etc. > > Therefore, I'm planning to implement an AJAX solution to > intercept the formfield data that is applicable to the transaction > and is required by Authorize.net and submit that via AJAX to a method > in a cfc, which will send the pertinent data to Authorize.net. > > In the success section of the AJAX solution to Authorize.net, I'll > implement a further submission of the rest of the form data (the > personally identifiable information) to another method in a cfc, > which will process that data for in-house (non-Authorize.net) use. > (Or something similar to this process...) > > Any warnings, cautions, or gotcha's in this approach? > > Thanks for any feedback! > > Rick > > > > ~| 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:352659 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Question about using AJAX with Authorize.net
well it depends how you process. if you redirect to authorize.net and then come back to your site, then why not simply send your thank you email after they are redirected back to your site, this is how most folks do it. The ajax stuff seems a bit overkill. If your processing serverside, then you simply need to wait till you get the response back from your CFHTTP call. On Tue, Sep 18, 2012 at 6:40 PM, Rick Faircloth wrote: > > I'm implementing my first donation form using Authorize.net. > > I've found in their fine-print that I cannot submit any personally > identifiable information to their servers. > > We have a form which includes personally identifiable information > for emailing thank-you's, etc. > > Therefore, I'm planning to implement an AJAX solution to > intercept the formfield data that is applicable to the transaction > and is required by Authorize.net and submit that via AJAX to a method > in a cfc, which will send the pertinent data to Authorize.net. > > In the success section of the AJAX solution to Authorize.net, I'll > implement a further submission of the rest of the form data (the > personally identifiable information) to another method in a cfc, > which will process that data for in-house (non-Authorize.net) use. > (Or something similar to this process...) > > Any warnings, cautions, or gotcha's in this approach? > > Thanks for any feedback! > > Rick > > > > ~| 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:352658 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Question about using AJAX with Authorize.net
I'm implementing my first donation form using Authorize.net. I've found in their fine-print that I cannot submit any personally identifiable information to their servers. We have a form which includes personally identifiable information for emailing thank-you's, etc. Therefore, I'm planning to implement an AJAX solution to intercept the formfield data that is applicable to the transaction and is required by Authorize.net and submit that via AJAX to a method in a cfc, which will send the pertinent data to Authorize.net. In the success section of the AJAX solution to Authorize.net, I'll implement a further submission of the rest of the form data (the personally identifiable information) to another method in a cfc, which will process that data for in-house (non-Authorize.net) use. (Or something similar to this process...) Any warnings, cautions, or gotcha's in this approach? Thanks for any feedback! Rick ~| 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:352656 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: SOT: returning data from ajax and displaying it..
Got it.. I just made a long string and then at the end set the innerHTML value to the string.. works like a charm! On Fri, Sep 14, 2012 at 2:15 PM, Greg Morphis wrote: > I've got this code: > myspan.innerHTML += '' > for(i=0; imyspan.innerHTML += >'' + presentation.DATA[i][presentation.COLUMNS.findIdx('TITLE')] >+ ' (' >+ presentation.DATA[i][presentation.COLUMNS.findIdx('AUTHOR')] >+ ') ' >+ presentation.DATA[i][presentation.COLUMNS.findIdx('DATE')] >+ "" > } > myspan.innerHTML += '' > > And it's not working properly.. when I look in Firebug I see: > > > Results for your search: > > > file 3 > (foo 2, foo 45) > 02-24-2012 > > > file b > (foo 1) > 02-24-2012 > > > > the are on the same line but they're definitely outside the for > loop looping over the 's. Any idea how to remedy this? > > Thanks! > > > ~| 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:352622 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
SOT: returning data from ajax and displaying it..
I've got this code: myspan.innerHTML += '' for(i=0; i' + presentation.DATA[i][presentation.COLUMNS.findIdx('TITLE')] + ' (' + presentation.DATA[i][presentation.COLUMNS.findIdx('AUTHOR')] + ') ' + presentation.DATA[i][presentation.COLUMNS.findIdx('DATE')] + "" } myspan.innerHTML += '' And it's not working properly.. when I look in Firebug I see: Results for your search: file 3 (foo 2, foo 45) 02-24-2012 file b (foo 1) 02-24-2012 the are on the same line but they're definitely outside the for loop looping over the 's. Any idea how to remedy this? Thanks! ~| 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:352621 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: problem with ajax on cflayout form submission
We would need to see the code of the cfm in tab2, and it's form's processor script, to help you out here. Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book "The best way to predict the future is to help create it" On 9/6/2012 6:29 AM, alex poyaoan wrote: > Yes steve sorry my question here is on the cflayoutarea2 tab 2 is a form > that submits on an action page after it executes it goes back to the calling > form from the tab but doesn't show the the updated form.. just blank even if > I use the > javascript below after the action query > > ColdFusion.Layout.hideTab('tabtest', 'tab2'); > ColdFusion.Layout.showTab('tabtest', 'tab2'); > ColdFusion.Layout.selectTab('tabtest', 'tab2'); > > >> Alex, >> >> Did you intend to include more here? Not seeing a question >> >> First peek, there's no closing cflayout tag, your 3rd tab should use >> the >> 'source' attribute, like your others, for consistency, and it appears >> >> that your code formatting is way off. Something like: >> >> > >> > source="tab1.cfm"> > >> > source="personshowTab2.cfm"> > >> > source="personshowTab3.cfm"> >> >> >> Steve 'Cutter' Blades >> Adobe Community Professional >> Adobe Certified Expert >> Advanced Macromedia ColdFusion MX 7 Developer >> >> http://cutterscrossing.com >> >> >> Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 >> https://www.packtpub. > com/learni> > ng-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book >> "The best way to predict the future is to help create it" >> >> On 9/6/2012 6:01 AM, alex poyaoan wrote: >>> Hi everybody have this >>> >>> >>> >>> >>> >>> >>> > source="personshowTab2.cfm"> >>> >>> >>> >>> >>> >>> >> template="personshowTab3.cfm"> >>> >>> >>> > ~| 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:352430 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: problem with ajax on cflayout form submission
Yes steve sorry my question here is on the cflayoutarea2 tab 2 is a form that submits on an action page after it executes it goes back to the calling form from the tab but doesn't show the the updated form.. just blank even if I use the javascript below after the action query ColdFusion.Layout.hideTab('tabtest', 'tab2'); ColdFusion.Layout.showTab('tabtest', 'tab2'); ColdFusion.Layout.selectTab('tabtest', 'tab2'); > Alex, > > Did you intend to include more here? Not seeing a question > > First peek, there's no closing cflayout tag, your 3rd tab should use > the > 'source' attribute, like your others, for consistency, and it appears > > that your code formatting is way off. Something like: > > > source="tab1.cfm"> > source="personshowTab2.cfm"> > source="personshowTab3.cfm"> > > > Steve 'Cutter' Blades > Adobe Community Professional > Adobe Certified Expert > Advanced Macromedia ColdFusion MX 7 Developer > > http://cutterscrossing.com > > > Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 > https://www.packtpub. com/learni> ng-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book > > "The best way to predict the future is to help create it" > > On 9/6/2012 6:01 AM, alex poyaoan wrote: > > Hi everybody have this > > > > > > > > > > > > > > source="personshowTab2.cfm"> > > > > > > > > > > > > > template="personshowTab3.cfm"> > > > > > > ~| 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:352429 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: problem with ajax on cflayout form submission
Alex, Did you intend to include more here? Not seeing a question First peek, there's no closing cflayout tag, your 3rd tab should use the 'source' attribute, like your others, for consistency, and it appears that your code formatting is way off. Something like: Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book "The best way to predict the future is to help create it" On 9/6/2012 6:01 AM, alex poyaoan wrote: > Hi everybody have this > > > > > > > > > > > > >template="personshowTab3.cfm"> > > > ~| 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:352428 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
problem with ajax on cflayout form submission
Hi everybody have this ~| 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:352427 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: JQuery .ajax() call posts back to invoking page only on Production
>> another thing i would check is to make sure your codebase is exactly the same Especially the Jquery code base. I have had numerous problems in that regard as well. Dennis Powers UXB Internet - A website Design and Hosting Company P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844 W: http://www.uxbinternet.com W: http://www.ctbusinesslist.com ~| 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:350059 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: JQuery .ajax() call posts back to invoking page only on Production
the usual culprit with page reloading on ajax request is forgetting to prevent the default action (click/submit) of the element that triggers ajax call. if your ajax call is part of a function bound to an anchor's click event, or a submit type input/button element - check that you do have e.preventDefault() in your function to cancel the default click/submit action. another thing i would check is to make sure your codebase is exactly the same, including your Application.cfc/cfm contents. if you are using Application.cfc, check if you have onRequest() method defined on your prod server - it may interfere with remote calls to cfc's. as Claude said, seeing the actual live page may help shed more light on the issue... Azadi On Wed, Feb 22, 2012 at 06:02, Brent Shaub wrote: > > Hello, thank you for any assistance with this puzzler. > > On my local Windows Vista development machine, I'm using CF 9. Here I have a > JavaScript call JQuery's $.ajax() method to write some text to a database > using a web service in a CFC. On my machine, it works as expected: writes > the values, screen stays put. > > On production, a leased webserver with Hostek.com, something different > happens. The .ajax() call accesses the CFC which writes to the database, > then after about five seconds, refreshes the screen with the data passed into > the CFC as querystring parameters. This page refresh is mucking up the > purpose of using ajax. > > I haven't a clue why this behavior is server-specific nor if the area of > research is Cold Fusion or the CF Admin settings or something else related to > JQuery. I have debugging IPs turned off on both environments. Why does an > ajax post turn into a get and refresh the URL after it's successful on > production and not development? > > Thanks and hope it's an easy one > Brent > > ~| 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:350025 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: JQuery .ajax() call posts back to invoking page only on Production
On Wed, Feb 22, 2012 at 8:12 AM, Brent Shaub wrote: > Hi Cameron, I tried that based on your suggestion and didn't see any > indication of back/forth communication. I liked how Chrome groups js and > css activities together so I can see where to spend some time cleaning > things up. I appreciate your suggestion. Fiddler 2 does a good job for > showing the traffic and shows that the ajax requests complete successfully. > It's that different behaviour of refreshing the page with querystring > params after completing that I'm out to determine the cause. > Perhaps you can point to the URL where this production code lives and someone on the list can take a look directly? -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook <http://www.facebook.com/cameroncf> | twitter<http://twitter.com/cameronc> | google+ <https://profiles.google.com/u/0/117829379451708140985> ~| 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:350023 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: JQuery .ajax() call posts back to invoking page only on Production
>For these sorts of this, I usually will turn on the Developer Tools panel >in Chrome and watch the back/forth communication int he browser via the >"network" tab. you can then click on any request's headers, response, etc. > >-Cameron > Hi Cameron, I tried that based on your suggestion and didn't see any indication of back/forth communication. I liked how Chrome groups js and css activities together so I can see where to spend some time cleaning things up. I appreciate your suggestion. Fiddler 2 does a good job for showing the traffic and shows that the ajax requests complete successfully. It's that different behaviour of refreshing the page with querystring params after completing that I'm out to determine the cause. ~| 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:350022 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: JQuery .ajax() call posts back to invoking page only on Production
For these sorts of this, I usually will turn on the Developer Tools panel in Chrome and watch the back/forth communication int he browser via the "network" tab. you can then click on any request's headers, response, etc. -Cameron On Tue, Feb 21, 2012 at 5:02 PM, Brent Shaub wrote: > > Hello, thank you for any assistance with this puzzler. > > On my local Windows Vista development machine, I'm using CF 9. Here I > have a JavaScript call JQuery's $.ajax() method to write some text to a > database using a web service in a CFC. On my machine, it works as > expected: writes the values, screen stays put. > > On production, a leased webserver with Hostek.com, something different > happens. The .ajax() call accesses the CFC which writes to the database, > then after about five seconds, refreshes the screen with the data passed > into the CFC as querystring parameters. This page refresh is mucking up > the purpose of using ajax. > > I haven't a clue why this behavior is server-specific nor if the area of > research is Cold Fusion or the CF Admin settings or something else related > to JQuery. I have debugging IPs turned off on both environments. Why does > an ajax post turn into a get and refresh the URL after it's successful on > production and not development? > > Thanks and hope it's an easy one > Brent > > ~| 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:350012 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
JQuery .ajax() call posts back to invoking page only on Production
Hello, thank you for any assistance with this puzzler. On my local Windows Vista development machine, I'm using CF 9. Here I have a JavaScript call JQuery's $.ajax() method to write some text to a database using a web service in a CFC. On my machine, it works as expected: writes the values, screen stays put. On production, a leased webserver with Hostek.com, something different happens. The .ajax() call accesses the CFC which writes to the database, then after about five seconds, refreshes the screen with the data passed into the CFC as querystring parameters. This page refresh is mucking up the purpose of using ajax. I haven't a clue why this behavior is server-specific nor if the area of research is Cold Fusion or the CF Admin settings or something else related to JQuery. I have debugging IPs turned off on both environments. Why does an ajax post turn into a get and refresh the URL after it's successful on production and not development? Thanks and hope it's an easy one Brent ~| 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:350011 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF AJAX controls not rendering?
This might be caused by the persitent cache in bug in Explorer. I put these lines in the template called by the Ajax function, and the problem is solved. ~| 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:348700 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF AJAX controls not rendering?
Sorry, forgot to mention that I'm using CF8. > Has anyone experienced this? > > In IE (6 and upwards) whenever I use an AJAX control (such as cfgrid), > after a couple of times of renderings (like switching to other pages > and back), the control will no longer be rendered properly, leaving > behind a very thin line that looks like the bounding box of the > control but with a height value of 0. Usually the only remedy is to do > a full reload (F5) for the controls to be rendered again. > > This behaviour does not appear on other browsers (so what's new?) and > seems to be an issue of IE. It's as if it has run out of memory of > rendering the controls and needs a hard refresh in order to draw again. > > > Any suggestions, explanations or solutions are appreciated. ~| 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:348698 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF AJAX controls not rendering?
Has anyone experienced this? In IE (6 and upwards) whenever I use an AJAX control (such as cfgrid), after a couple of times of renderings (like switching to other pages and back), the control will no longer be rendered properly, leaving behind a very thin line that looks like the bounding box of the control but with a height value of 0. Usually the only remedy is to do a full reload (F5) for the controls to be rendered again. This behaviour does not appear on other browsers (so what's new?) and seems to be an issue of IE. It's as if it has run out of memory of rendering the controls and needs a hard refresh in order to draw again. Any suggestions, explanations or solutions are appreciated. ~| 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:348697 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data
Good job "Steve"!! On Sep 24, 2011, at 8:18 AM, "Rick Faircloth" wrote: > > Duh... Steve, what you and Russ have pointed out makes perfect sense. > My initial thought was to use onRequestStart, but for some reason > decided to use onApplicationStart, which wouldn't work for every page. > > I guess I was thinking of just creating the variables once for > global use, rather than focusing on the fact that I needed to create > them for every page. > > Thanks for the tip! (...and the code, Steve! :o) > > And yes, it's CF9... > > Rick > > -Original Message- > From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com] > Sent: Saturday, September 24, 2011 8:41 AM > To: cf-talk > Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data > > > You wouldn't put it in onApplicationStart, but onRequest (cf9+). > onRequest is only triggered on cfm requests, whereas a cfc would trigger > onCFCRequest. (I am assuming your Ajax requests are going to a CFC) > > Set up your js vars in onApplicationStart > > > application.siteDetail = {"js_sitename"=application.sitename, > "js_website"=application.website, > "js_site_manager_dsn"=application.site_manager_dsn, > "js_client_dsn"=application.client_dsn } > > > Then, in your onRequest (though some header include custom tag, included > at the page level, would be better and give greater flexibility) > > var siteDetail = > #SerializeJSON(application.siteDetail)#; > > Then, in your JS, access the vars from the JS obj > > ... // some JQuery Ajax call data object > data: $.extend(true,{},siteDetail,{someArg:1,someArg2:'myArg'}) > > There's probably many ways to handle all of this, but putting the output > in your onApplication or onSession methods is not the way to go. > > Steve 'Cutter' Blades > Adobe Community Professional > Adobe Certified Expert > Advanced Macromedia ColdFusion MX 7 Developer > > http://cutterscrossing.com > > > Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 > https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-st > yle-user-interfaces/book > > "The best way to predict the future is to help create it" > > > On 9/24/2011 7:31 AM, Rick Faircloth wrote: >> Ok... something to talk about besides $20/hr (which may look >> really good, depending on how hungry you are...) >> >> I recently started using cfhtmlhead in onApplicationStart to put >> the following CF/JS in the head of each page to translate my CF >> site variables to JS: >> >> >> >> >> >> >> >> >> >> >> var js_sitename = '#js_siteName#'; >> var js_website = '#js_website#'; >> var js_site_manager_dsn = '#js_site_manager_dsn#'; >> var js_client_dsn = '#js_client_dsn#'; >> >> >> >> >> >> However, I just coded a page to load its content via jQuery AJAX >> which accesses a CFC method which uses cfSaveContent to generate >> the page.s HTML and then saves that to a document, which is then loaded >> via jQuery AJAX. >> >> After cfSaveContent does its thing, I send a 'Success' message >> in JSON back to the AJAX call. But this wasn't working. I've written >> this routine hundreds of times, so I know nothing was wrong with the >> AJAX code. >> >> It turns out that the JS above in between the two's was >> being sent back in the JSON, which was causing the message being sent >> back to the AJAX call to not just be 'Success', which would trigger >> the page HTML loading. >> >> Why would the above JS show up in the JSON data and what can I do about >> it? Taking the cfhtmlhead functionality out of the application.cfc's >> onApplicationStart routine and putting it manually in the head of the >> document solved the problem, but I enjoyed being able to insert the >> variable routine into the head of each page automatically. >> >> Thoughts? Suggestions? >> >> For $20 an hour? :o) >> >> Rick >> >> >> >> > > > > ~| 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:347689 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Code from cfhtmlhead showing up in jQuery AJAX JSON data
Duh... Steve, what you and Russ have pointed out makes perfect sense. My initial thought was to use onRequestStart, but for some reason decided to use onApplicationStart, which wouldn't work for every page. I guess I was thinking of just creating the variables once for global use, rather than focusing on the fact that I needed to create them for every page. Thanks for the tip! (...and the code, Steve! :o) And yes, it's CF9... Rick -Original Message- From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com] Sent: Saturday, September 24, 2011 8:41 AM To: cf-talk Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data You wouldn't put it in onApplicationStart, but onRequest (cf9+). onRequest is only triggered on cfm requests, whereas a cfc would trigger onCFCRequest. (I am assuming your Ajax requests are going to a CFC) Set up your js vars in onApplicationStart application.siteDetail = {"js_sitename"=application.sitename, "js_website"=application.website, "js_site_manager_dsn"=application.site_manager_dsn, "js_client_dsn"=application.client_dsn } Then, in your onRequest (though some header include custom tag, included at the page level, would be better and give greater flexibility) var siteDetail = #SerializeJSON(application.siteDetail)#; Then, in your JS, access the vars from the JS obj ... // some JQuery Ajax call data object data: $.extend(true,{},siteDetail,{someArg:1,someArg2:'myArg'}) There's probably many ways to handle all of this, but putting the output in your onApplication or onSession methods is not the way to go. Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-st yle-user-interfaces/book "The best way to predict the future is to help create it" On 9/24/2011 7:31 AM, Rick Faircloth wrote: > Ok... something to talk about besides $20/hr (which may look > really good, depending on how hungry you are...) > > I recently started using cfhtmlhead in onApplicationStart to put > the following CF/JS in the head of each page to translate my CF > site variables to JS: > > > > > > > > > > > var js_sitename = '#js_siteName#'; > var js_website = '#js_website#'; > var js_site_manager_dsn = '#js_site_manager_dsn#'; > var js_client_dsn = '#js_client_dsn#'; > > > > > > However, I just coded a page to load its content via jQuery AJAX > which accesses a CFC method which uses cfSaveContent to generate > the page.s HTML and then saves that to a document, which is then loaded > via jQuery AJAX. > > After cfSaveContent does its thing, I send a 'Success' message > in JSON back to the AJAX call. But this wasn't working. I've written > this routine hundreds of times, so I know nothing was wrong with the > AJAX code. > > It turns out that the JS above in between the two's was > being sent back in the JSON, which was causing the message being sent > back to the AJAX call to not just be 'Success', which would trigger > the page HTML loading. > > Why would the above JS show up in the JSON data and what can I do about > it? Taking the cfhtmlhead functionality out of the application.cfc's > onApplicationStart routine and putting it manually in the head of the > document solved the problem, but I enjoyed being able to insert the > variable routine into the head of each page automatically. > > Thoughts? Suggestions? > > For $20 an hour? :o) > > Rick > > > > ~| 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:347688 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data
You wouldn't put it in onApplicationStart, but onRequest (cf9+). onRequest is only triggered on cfm requests, whereas a cfc would trigger onCFCRequest. (I am assuming your Ajax requests are going to a CFC) Set up your js vars in onApplicationStart application.siteDetail = {"js_sitename"=application.sitename, "js_website"=application.website, "js_site_manager_dsn"=application.site_manager_dsn, "js_client_dsn"=application.client_dsn } Then, in your onRequest (though some header include custom tag, included at the page level, would be better and give greater flexibility) var siteDetail = #SerializeJSON(application.siteDetail)#; Then, in your JS, access the vars from the JS obj ... // some JQuery Ajax call data object data: $.extend(true,{},siteDetail,{someArg:1,someArg2:'myArg'}) There's probably many ways to handle all of this, but putting the output in your onApplication or onSession methods is not the way to go. Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book "The best way to predict the future is to help create it" On 9/24/2011 7:31 AM, Rick Faircloth wrote: > Ok... something to talk about besides $20/hr (which may look > really good, depending on how hungry you are...) > > I recently started using cfhtmlhead in onApplicationStart to put > the following CF/JS in the head of each page to translate my CF > site variables to JS: > > > > > > > > > > > var js_sitename = '#js_siteName#'; > var js_website = '#js_website#'; > var js_site_manager_dsn = '#js_site_manager_dsn#'; > var js_client_dsn = '#js_client_dsn#'; > > > > > > However, I just coded a page to load its content via jQuery AJAX > which accesses a CFC method which uses cfSaveContent to generate > the page.s HTML and then saves that to a document, which is then loaded > via jQuery AJAX. > > After cfSaveContent does its thing, I send a 'Success' message > in JSON back to the AJAX call. But this wasn't working. I've written > this routine hundreds of times, so I know nothing was wrong with the > AJAX code. > > It turns out that the JS above in between the two's was > being sent back in the JSON, which was causing the message being sent > back to the AJAX call to not just be 'Success', which would trigger > the page HTML loading. > > Why would the above JS show up in the JSON data and what can I do about > it? Taking the cfhtmlhead functionality out of the application.cfc's > onApplicationStart routine and putting it manually in the head of the > document solved the problem, but I enjoyed being able to insert the > variable routine into the head of each page automatically. > > Thoughts? Suggestions? > > For $20 an hour? :o) > > Rick > > > > ~| 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:347687 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data
well using your current method the vars will of course will only be created and output once when application starts, so wont exist on any subsequent requests, which I do not think is what you want if they are JS variables you want them output on every page request in order for them to be available to JS, so you would need to do it onrequestStart or just by putting them in the actual html head. Technically if there is no HEAD section then CF should not be trying to insert the content, so in your CFC's you need to make sure you have output disabled so that unnecessary content doesn't get added. You may also need to make use of is some places as well. Russ On Sat, Sep 24, 2011 at 1:06 PM, Rick Faircloth wrote: > > Only onApplicationStart currently. > > I thought about using onRequestStart, but it needs to > always be on the page, anyway, so I thought I'd do it once > in the onApplicationStart routine. > > Is that a problem? > > Oh, wait... do you mean every "page request" or every > AJAX "request" for data? > > > -Original Message- > From: Russ Michaels [mailto:r...@michaels.me.uk] > Sent: Saturday, September 24, 2011 8:00 AM > To: cf-talk > Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data > > > it is only happening onApplicationstart or is it being inserted into > every request ? > > Russ > > On Sat, Sep 24, 2011 at 12:31 PM, Rick Faircloth > wrote: >> >> Ok... something to talk about besides $20/hr (which may look >> really good, depending on how hungry you are...) >> >> I recently started using cfhtmlhead in onApplicationStart to put >> the following CF/JS in the head of each page to translate my CF >> site variables to JS: >> >> >> >> >> >> >> >> >> >> >> var js_sitename = '#js_siteName#'; >> var js_website = '#js_website#'; >> var js_site_manager_dsn = '#js_site_manager_dsn#'; >> var js_client_dsn = '#js_client_dsn#'; >> >> >> >> >> >> However, I just coded a page to load its content via jQuery AJAX >> which accesses a CFC method which uses cfSaveContent to generate >> the page.s HTML and then saves that to a document, which is then loaded >> via jQuery AJAX. >> >> After cfSaveContent does its thing, I send a 'Success' message >> in JSON back to the AJAX call. But this wasn't working. I've written >> this routine hundreds of times, so I know nothing was wrong with the >> AJAX code. >> >> It turns out that the JS above in between the two 's was >> being sent back in the JSON, which was causing the message being sent >> back to the AJAX call to not just be 'Success', which would trigger >> the page HTML loading. >> >> Why would the above JS show up in the JSON data and what can I do about >> it? Taking the cfhtmlhead functionality out of the application.cfc's >> onApplicationStart routine and putting it manually in the head of the >> document solved the problem, but I enjoyed being able to insert the >> variable routine into the head of each page automatically. >> >> Thoughts? Suggestions? >> >> For $20 an hour? :o) >> >> Rick >> >> >> >> > > > > ~| 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:347686 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Code from cfhtmlhead showing up in jQuery AJAX JSON data
Only onApplicationStart currently. I thought about using onRequestStart, but it needs to always be on the page, anyway, so I thought I'd do it once in the onApplicationStart routine. Is that a problem? Oh, wait... do you mean every "page request" or every AJAX "request" for data? -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Saturday, September 24, 2011 8:00 AM To: cf-talk Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data it is only happening onApplicationstart or is it being inserted into every request ? Russ On Sat, Sep 24, 2011 at 12:31 PM, Rick Faircloth wrote: > > Ok... something to talk about besides $20/hr (which may look > really good, depending on how hungry you are...) > > I recently started using cfhtmlhead in onApplicationStart to put > the following CF/JS in the head of each page to translate my CF > site variables to JS: > > > > > > > > > > > var js_sitename = '#js_siteName#'; > var js_website = '#js_website#'; > var js_site_manager_dsn = '#js_site_manager_dsn#'; > var js_client_dsn = '#js_client_dsn#'; > > > > > > However, I just coded a page to load its content via jQuery AJAX > which accesses a CFC method which uses cfSaveContent to generate > the page.s HTML and then saves that to a document, which is then loaded > via jQuery AJAX. > > After cfSaveContent does its thing, I send a 'Success' message > in JSON back to the AJAX call. But this wasn't working. I've written > this routine hundreds of times, so I know nothing was wrong with the > AJAX code. > > It turns out that the JS above in between the two 's was > being sent back in the JSON, which was causing the message being sent > back to the AJAX call to not just be 'Success', which would trigger > the page HTML loading. > > Why would the above JS show up in the JSON data and what can I do about > it? Taking the cfhtmlhead functionality out of the application.cfc's > onApplicationStart routine and putting it manually in the head of the > document solved the problem, but I enjoyed being able to insert the > variable routine into the head of each page automatically. > > Thoughts? Suggestions? > > For $20 an hour? :o) > > Rick > > > > ~| 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:347683 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data
it is only happening onApplicationstart or is it being inserted into every request ? Russ On Sat, Sep 24, 2011 at 12:31 PM, Rick Faircloth wrote: > > Ok... something to talk about besides $20/hr (which may look > really good, depending on how hungry you are...) > > I recently started using cfhtmlhead in onApplicationStart to put > the following CF/JS in the head of each page to translate my CF > site variables to JS: > > > > > > > > > > > var js_sitename = '#js_siteName#'; > var js_website = '#js_website#'; > var js_site_manager_dsn = '#js_site_manager_dsn#'; > var js_client_dsn = '#js_client_dsn#'; > > > > > > However, I just coded a page to load its content via jQuery AJAX > which accesses a CFC method which uses cfSaveContent to generate > the page.s HTML and then saves that to a document, which is then loaded > via jQuery AJAX. > > After cfSaveContent does its thing, I send a 'Success' message > in JSON back to the AJAX call. But this wasn't working. I've written > this routine hundreds of times, so I know nothing was wrong with the > AJAX code. > > It turns out that the JS above in between the two 's was > being sent back in the JSON, which was causing the message being sent > back to the AJAX call to not just be 'Success', which would trigger > the page HTML loading. > > Why would the above JS show up in the JSON data and what can I do about > it? Taking the cfhtmlhead functionality out of the application.cfc's > onApplicationStart routine and putting it manually in the head of the > document solved the problem, but I enjoyed being able to insert the > variable routine into the head of each page automatically. > > Thoughts? Suggestions? > > For $20 an hour? :o) > > Rick > > > > ~| 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:347681 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Code from cfhtmlhead showing up in jQuery AJAX JSON data
Ok... something to talk about besides $20/hr (which may look really good, depending on how hungry you are...) I recently started using cfhtmlhead in onApplicationStart to put the following CF/JS in the head of each page to translate my CF site variables to JS: var js_sitename = '#js_siteName#'; var js_website = '#js_website#'; var js_site_manager_dsn = '#js_site_manager_dsn#'; var js_client_dsn = '#js_client_dsn#'; However, I just coded a page to load its content via jQuery AJAX which accesses a CFC method which uses cfSaveContent to generate the page.s HTML and then saves that to a document, which is then loaded via jQuery AJAX. After cfSaveContent does its thing, I send a 'Success' message in JSON back to the AJAX call. But this wasn't working. I've written this routine hundreds of times, so I know nothing was wrong with the AJAX code. It turns out that the JS above in between the two 's was being sent back in the JSON, which was causing the message being sent back to the AJAX call to not just be 'Success', which would trigger the page HTML loading. Why would the above JS show up in the JSON data and what can I do about it? Taking the cfhtmlhead functionality out of the application.cfc's onApplicationStart routine and putting it manually in the head of the document solved the problem, but I enjoyed being able to insert the variable routine into the head of each page automatically. Thoughts? Suggestions? For $20 an hour? :o) Rick ~| 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:347680 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Caching ajax / dhtml
Well, cf can pre-render it. Two ways you could accomplish this are a) use twitter's api to get the tweets on the server side and cache it. or b) create another js function that takes the tweet results and passes them back to the server for caching, thus avoiding api development. On Wed, Sep 14, 2011 at 7:13 AM, Matt Williams wrote: > > I switched to cffeed. I'm afraid we'll hit Twitter's limit too easily. > I've already seen it in on the staging site. > > Thanks, I knew that about the client side javascript, I was just > thinking that somehow the CF could pre-render that. > > Working too late, too many hours > > -Matt > > On Tue, Sep 13, 2011 at 8:24 PM, Michael Grant wrote: > > > > Not on the client side. Either way you have to hit a server. Better > > Twitter's than yours I'd say. > > > > > > > > On Tue, Sep 13, 2011 at 7:12 PM, Matt Williams wrote: > > > >> > >> I have some divs that are populated with tweet.js (jquery plugin for > >> twitter). So on document.ready(), the divs are populated by the > >> plugin. > >> > >> I don't want to hit twitter on every page load and want to cache the > >> populated divs somehow. > >> > >> Is there a way to take those populated divs and cache them? Simply > >> saving the content to html is still saving the javascript too and not > >> the actual output. > >> > >> I guess I may have to switch to grabbing the feed using cffeed or > >> something, but this code is already done and styled, so I was hoping > >> for something else. > >> > >> Thanks, > >> > >> -Matt > >> > >> > > > > > > ~| 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:347458 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Caching ajax / dhtml
I switched to cffeed. I'm afraid we'll hit Twitter's limit too easily. I've already seen it in on the staging site. Thanks, I knew that about the client side javascript, I was just thinking that somehow the CF could pre-render that. Working too late, too many hours -Matt On Tue, Sep 13, 2011 at 8:24 PM, Michael Grant wrote: > > Not on the client side. Either way you have to hit a server. Better > Twitter's than yours I'd say. > > > > On Tue, Sep 13, 2011 at 7:12 PM, Matt Williams wrote: > >> >> I have some divs that are populated with tweet.js (jquery plugin for >> twitter). So on document.ready(), the divs are populated by the >> plugin. >> >> I don't want to hit twitter on every page load and want to cache the >> populated divs somehow. >> >> Is there a way to take those populated divs and cache them? Simply >> saving the content to html is still saving the javascript too and not >> the actual output. >> >> I guess I may have to switch to grabbing the feed using cffeed or >> something, but this code is already done and styled, so I was hoping >> for something else. >> >> Thanks, >> >> -Matt >> >> > > ~| 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:347457 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Caching ajax / dhtml
Not on the client side. Either way you have to hit a server. Better Twitter's than yours I'd say. On Tue, Sep 13, 2011 at 7:12 PM, Matt Williams wrote: > > I have some divs that are populated with tweet.js (jquery plugin for > twitter). So on document.ready(), the divs are populated by the > plugin. > > I don't want to hit twitter on every page load and want to cache the > populated divs somehow. > > Is there a way to take those populated divs and cache them? Simply > saving the content to html is still saving the javascript too and not > the actual output. > > I guess I may have to switch to grabbing the feed using cffeed or > something, but this code is already done and styled, so I was hoping > for something else. > > Thanks, > > -Matt > > ~| 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:347453 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Caching ajax / dhtml
JavaScript is run on the client side, so unless that JavaScript is pointed to your server to get the information... You will need to find another way. -- William Seiter On Sep 13, 2011, at 4:12 PM, Matt Williams wrote: > > I have some divs that are populated with tweet.js (jquery plugin for > twitter). So on document.ready(), the divs are populated by the > plugin. > > I don't want to hit twitter on every page load and want to cache the > populated divs somehow. > > Is there a way to take those populated divs and cache them? Simply > saving the content to html is still saving the javascript too and not > the actual output. > > I guess I may have to switch to grabbing the feed using cffeed or > something, but this code is already done and styled, so I was hoping > for something else. > > Thanks, > > -Matt > > ~| 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:347451 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Caching ajax / dhtml
I have some divs that are populated with tweet.js (jquery plugin for twitter). So on document.ready(), the divs are populated by the plugin. I don't want to hit twitter on every page load and want to cache the populated divs somehow. Is there a way to take those populated divs and cache them? Simply saving the content to html is still saving the javascript too and not the actual output. I guess I may have to switch to grabbing the feed using cffeed or something, but this code is already done and styled, so I was hoping for something else. Thanks, -Matt ~| 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:347449 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Tracking the number of simultaneous AJAX requests to a CFC
OK, I think I found the answer. First off there is no such thing a an XMLHttpRequest, that's just the name of the object, and from what I've read in one of my books (Ajax, Your visual blueprint for creating rich Internet applications) an Ajax request is an http request, so if that is the case then the number of simultaneous requests with Ajax to cfc's are limited by the setting "Maximum number of simultaneous CFC function requests". If anyone thinks different, please let me know. thanks. ~| 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:346067 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm