[jQuery] Re: AjaxCFC success return value
bump :) -- View this message in context: http://www.nabble.com/AjaxCFC-success-return-value-tp21580307s27240p21581667.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: AjaxCFC and jQuery 1.2.2 and above
Hi Josh, Yeah neither Rob nor myself have had time to focus on AjaxCFC due to time constraints. If you have the error, I can take a peak. Rey Josh Nathanson wrote: Hey all, I was working with the new jQuery 1.2.3 over the weekend and noticed that it broke my ajaxCFC installation. I had to roll back to jQuery 1.2.1 before ajaxCFC would work again. Has anyone else noticed this? If so has anyone done a port of ajaxCFC to jQ 1.2.2 and above? It looks like development of ajaxCFC has ground to a halt...bummer... -- Josh
[jQuery] Re: AjaxCFC and jQuery 1.2.2 and above
Rey, I'll slap together a test page and send another email when it's ready. -- Josh - Original Message - From: Rey Bango [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Monday, February 25, 2008 10:57 AM Subject: [jQuery] Re: AjaxCFC and jQuery 1.2.2 and above Hi Josh, Yeah neither Rob nor myself have had time to focus on AjaxCFC due to time constraints. If you have the error, I can take a peak. Rey Josh Nathanson wrote: Hey all, I was working with the new jQuery 1.2.3 over the weekend and noticed that it broke my ajaxCFC installation. I had to roll back to jQuery 1.2.1 before ajaxCFC would work again. Has anyone else noticed this? If so has anyone done a port of ajaxCFC to jQ 1.2.2 and above? It looks like development of ajaxCFC has ground to a halt...bummer... -- Josh
[jQuery] Re: AjaxCFC and jQuery 1.2.2 and above
OK, turns out it wasn't ajaxCFC after all. I had an older version of livequery that I hadn't updated to the latest version that was conflicting with the newer versions of jQuery. I've gotten the latest version of livequery and now all is good. Sorry about the false alarm! -- Josh - Original Message - From: Rey Bango [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Monday, February 25, 2008 10:57 AM Subject: [jQuery] Re: AjaxCFC and jQuery 1.2.2 and above Hi Josh, Yeah neither Rob nor myself have had time to focus on AjaxCFC due to time constraints. If you have the error, I can take a peak. Rey Josh Nathanson wrote: Hey all, I was working with the new jQuery 1.2.3 over the weekend and noticed that it broke my ajaxCFC installation. I had to roll back to jQuery 1.2.1 before ajaxCFC would work again. Has anyone else noticed this? If so has anyone done a port of ajaxCFC to jQ 1.2.2 and above? It looks like development of ajaxCFC has ground to a halt...bummer... -- Josh
[jQuery] Re: AjaxCFC + jQuery tutorial: part 2
I'll forgive your lateness if you post the link. :) andy _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jordan Sent: Thursday, October 18, 2007 11:35 PM To: jQuery Group Subject: [jQuery] AjaxCFC + jQuery tutorial: part 2 I realize that this is way late in coming, but I've finally put together part two of the AjaxCFC + jQuery tutorial. I feel seriously guilty about not getting it out before now, so I hope anyone who was interested in seeing it still is, will forgive my lateness in getting it published, and will find it useful and informative. Cheers, Chris -- http://cjordan.us
[jQuery] Re: AjaxCFC + jQuery tutorial: part 2
http://cjordan.us/index.cfm/2007/10/18/jQuery--AjaxCFC-Tutorial-Part-2-H andling-Complex-Data Jim -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Friday, October 19, 2007 9:16 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: AjaxCFC + jQuery tutorial: part 2 I'll forgive your lateness if you post the link. From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jordan Sent: Thursday, October 18, 2007 11:35 PM To: jQuery Group Subject: [jQuery] AjaxCFC + jQuery tutorial: part 2 I realize that this is way late in coming, but I've finally put together part two of the AjaxCFC + jQuery tutorial. I feel seriously guilty about not getting it out before now, so I hope anyone who was interested in seeing it still is, will forgive my lateness in getting it published, and will find it useful and informative.
[jQuery] Re: ajaxCFC and CF8
O... wrappers around the jQuery UI components sounds cool. Gotta keep us posted about that one! :o) Chris On 10/3/07, Rey Bango [EMAIL PROTECTED] wrote: Brook, CF8 provides quite a number of options in terms of prebuilt Ajax controls but I tend to refer to them as intro widgets. They don't provide the level of functionality available in jQuery or many other libs and do not adhere to any form of progressive enhancement. Also, few users want to use Spry for their development and CF8, out of the box, already includes an outdated and non-upgradeable version of YUI. AjaxCFC most certainly remains relevant as it provides a very easy interface for making Ajax calls to your CF templates and leveraging native CF data types. In addition, since jQuery is included in AjaxCFC, you now have the capability to leverage the wealth of jQuery plugins available. And since it's open source, you can upgrade things as needed instead of having to wait until Adobe patches the libs. Rob and I will be working on updating AjaxCFC to jQuery v1.2.1 soon and possibly creating wrappers around jQuery UI components. Rey... Brook Davies wrote: Can Rob or Rey shed some light on this? Is ajaxCFC still relevant with the release of CF8? BrookD -- http://cjordan.us
[jQuery] Re: AjaxCFC
Thanks for the feecback Jack. I am using the success() method and within that method I want to call a method on the current object. The reason is because I have spawned multiple objects and they all fetch data via ajaxCFC and I want the correct object to handle the result. I could save a reference in the global scope, but that would mean I could only have one ajax call at a time. I just wish I could pass an object through to the callback handler so that reference would be available in success(). I guess I could pass a string reference to the class object to the server and have it returned an evaluated - but there must be a better way, no? BrookD _ size=2 width=100% align=center tabindex=-1 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack Killpatrick Sent: October 3, 2007 6:19 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: AjaxCFC Hmm, maybe create a global var to hold a ref to the scope? var currentObj; and in getData: currentObj = this; ajax call and in dataResult: currentObj.someProperty = data.yadda; currentObj = null; ? In case you don't know, the ajaxCFC also has a success callback: $.AjaxCFC({ url: some.cfc, method: 'doIt', data: { yadda:'ya' }, success: function(data){ do some stuff; } }); I'm assuming you're calling the dataResult() function via the success attribute, but just in case, FYI. It doesn't really change the approach to knowing scope thing, though, AFAIK. If you try putting this inside the anonymous function, it still won't know the calling object. - Jack Brook Davies wrote: Hello Jack, Well I want to get the scope of the calling object that the function resides in. I have multiple instances of this object: someObj = { getData: function(){ //cfAjax request starts here } , dataResult: function(data){ // handle result from cfAjax here } } a = new someObj() b = new someObj() // call getData on 'a' instance a.getData(); This is where I want the cfAjax callback to be within the scope of the 'a' object or at least somehow get a reference to 'a'. How do I do that? BrookD
[jQuery] Re: ajaxCFC and CF8
Thanks Rey! I didn't so much mean about using the built in ajax components, but more along the lines of all the work ajaxCFC does converting to json and such. Isn't some of that functionality build into CF8 now? BrookD -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: October 3, 2007 5:52 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: ajaxCFC and CF8 Brook, CF8 provides quite a number of options in terms of prebuilt Ajax controls but I tend to refer to them as intro widgets. They don't provide the level of functionality available in jQuery or many other libs and do not adhere to any form of progressive enhancement. Also, few users want to use Spry for their development and CF8, out of the box, already includes an outdated and non-upgradeable version of YUI. AjaxCFC most certainly remains relevant as it provides a very easy interface for making Ajax calls to your CF templates and leveraging native CF data types. In addition, since jQuery is included in AjaxCFC, you now have the capability to leverage the wealth of jQuery plugins available. And since it's open source, you can upgrade things as needed instead of having to wait until Adobe patches the libs. Rob and I will be working on updating AjaxCFC to jQuery v1.2.1 soon and possibly creating wrappers around jQuery UI components. Rey... Brook Davies wrote: Can Rob or Rey shed some light on this? Is ajaxCFC still relevant with the release of CF8? BrookD
[jQuery] Re: AjaxCFC
Email Rob Gonda and see what he says about all this. He's the ultimate source on ajaxCFC anyway. If you get an answer to this, it'd be cool to hear about it. Chris On 10/4/07, Brook Davies [EMAIL PROTECTED] wrote: Thanks for the feecback Jack. I am using the success() method and within that method I want to call a method on the current object. The reason is because I have spawned multiple objects and they all fetch data via ajaxCFC and I want the correct object to handle the result. I could save a reference in the global scope, but that would mean I could only have one ajax call at a time. I just wish I could pass an object through to the callback handler so that reference would be available in success(). I guess I could pass a string reference to the class object to the server and have it returned an evaluated – but there must be a better way, no? BrookD -- size=2 width=100% align=center tabindex=-1 *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Jack Killpatrick *Sent:* October 3, 2007 6:19 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: AjaxCFC Hmm, maybe create a global var to hold a ref to the scope? var currentObj; and in getData: currentObj = this; ajax call and in dataResult: currentObj.someProperty = data.yadda; currentObj = null; ? In case you don't know, the ajaxCFC also has a success callback: $.AjaxCFC({ url: some.cfc, method: 'doIt', data: { yadda:'ya' }, success: function(data){ do some stuff; } }); I'm assuming you're calling the dataResult() function via the success attribute, but just in case, FYI. It doesn't really change the approach to knowing scope thing, though, AFAIK. If you try putting this inside the anonymous function, it still won't know the calling object. - Jack Brook Davies wrote: Hello Jack, Well I want to get the scope of the calling object that the function resides in. I have multiple instances of this object: someObj = { getData: function(){ //cfAjax request starts here } , dataResult: function(data){ // handle result from cfAjax here } } a = new someObj() b = new someObj() // call getData on 'a' instance a.getData(); This is where I want the cfAjax callback to be within the scope of the 'a' object or at least somehow get a reference to 'a'. How do I do that? BrookD -- http://cjordan.us
[jQuery] Re: AjaxCFC
Not sure if this will work, but maybe try passing it as a 2nd arg in the success call: var _this = this; success: function(data, _this){ alert(_this.someProperty): } - Jack Brook Davies wrote: Thanks for the feecback Jack. I am using the success() method and within that method I want to call a method on the current object. The reason is because I have spawned multiple objects and they all fetch data via ajaxCFC and I want the correct object to handle the result. I could save a reference in the global scope, but that would mean I could only have one ajax call at a time. I just wish I could pass an object through to the callback handler so that reference would be available in success(). I guess I could pass a string reference to the class object to the server and have it returned an evaluated -- but there must be a better way, no? BrookD size=2 width=100% align=center tabindex=-1 *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Jack Killpatrick *Sent:* October 3, 2007 6:19 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: AjaxCFC Hmm, maybe create a global var to hold a ref to the scope? var currentObj; and in getData: currentObj = this; ajax call and in dataResult: currentObj.someProperty = data.yadda; currentObj = null; ? In case you don't know, the ajaxCFC also has a success callback: $.AjaxCFC({ url: some.cfc, method: 'doIt', data: { yadda:'ya' }, success: function(data){ do some stuff; } }); I'm assuming you're calling the dataResult() function via the success attribute, but just in case, FYI. It doesn't really change the approach to knowing scope thing, though, AFAIK. If you try putting this inside the anonymous function, it still won't know the calling object. - Jack Brook Davies wrote: Hello Jack, Well I want to get the scope of the calling object that the function resides in. I have multiple instances of this object: someObj = { getData: function(){ //cfAjax request starts here } , dataResult: function(data){ // handle result from cfAjax here } } a = new someObj() b = new someObj() // call getData on 'a' instance a.getData(); This is where I want the cfAjax callback to be within the scope of the 'a' object or at least somehow get a reference to 'a'. How do I do that? BrookD
[jQuery] Re: AjaxCFC
Hello Jack, Well I want to get the scope of the calling object that the function resides in. I have multiple instances of this object: someObj = { getData: function(){ //cfAjax request starts here } , dataResult: function(data){ // handle result from cfAjax here } } a = new someObj() b = new someObj() // call getData on 'a' instance a.getData(); This is where I want the cfAjax callback to be within the scope of the 'a' object or at least somehow get a reference to 'a'. How do I do that? BrookD
[jQuery] Re: AjaxCFC
Brook: Your post is just vague enough to not be answerable. What exactly do you mean by calling object? Do you mean the function inside which you make the $.AjaxCFC() call? Do you mean the the arguments - and their values - passed via the data property of AjaxCFC? A code snippet would really help. On Oct 2, 3:39 pm, Brook Davies [EMAIL PROTECTED] wrote: Can anyone who uses ajaxCFC tell me how to get a reference to the calling objects scope in the success handler? I can't figure out how to pass arguments through to the callback / success handler. Anyone? FYI, I am using the jQuery version of ajaxCFC. Works awesome BTW. BrookD.
[jQuery] Re: ajaxCFC and CF8
Brook, CF8 provides quite a number of options in terms of prebuilt Ajax controls but I tend to refer to them as intro widgets. They don't provide the level of functionality available in jQuery or many other libs and do not adhere to any form of progressive enhancement. Also, few users want to use Spry for their development and CF8, out of the box, already includes an outdated and non-upgradeable version of YUI. AjaxCFC most certainly remains relevant as it provides a very easy interface for making Ajax calls to your CF templates and leveraging native CF data types. In addition, since jQuery is included in AjaxCFC, you now have the capability to leverage the wealth of jQuery plugins available. And since it's open source, you can upgrade things as needed instead of having to wait until Adobe patches the libs. Rob and I will be working on updating AjaxCFC to jQuery v1.2.1 soon and possibly creating wrappers around jQuery UI components. Rey... Brook Davies wrote: Can Rob or Rey shed some light on this? Is ajaxCFC still relevant with the release of CF8? BrookD
[jQuery] Re: AjaxCFC
Hmm, maybe create a global var to hold a ref to the scope? var currentObj; and in getData: currentObj = this; ajax call and in dataResult: currentObj.someProperty = data.yadda; currentObj = null; ? In case you don't know, the ajaxCFC also has a success callback: $.AjaxCFC({ url: some.cfc, method: 'doIt', data: { yadda:'ya' }, success: function(data){ do some stuff; } }); I'm assuming you're calling the dataResult() function via the success attribute, but just in case, FYI. It doesn't really change the approach to knowing scope thing, though, AFAIK. If you try putting this inside the anonymous function, it still won't know the calling object. - Jack Brook Davies wrote: Hello Jack, Well I want to get the scope of the calling object that the function resides in. I have multiple instances of this object: someObj = { getData: function(){ //cfAjax request starts here } , dataResult: function(data){ // handle result from cfAjax here } } a = new someObj() b = new someObj() // call getData on 'a' instance a.getData(); This is where I want the cfAjax callback to be within the scope of the 'a' object or at least somehow get a reference to 'a'. How do I do that? BrookD
[jQuery] Re: AjaxCFC
Can you post your current code, at least the fragment that contains the AjaxCFC call? -- Josh - Original Message - From: Brook Davies To: jquery-en@googlegroups.com Sent: Tuesday, October 02, 2007 1:39 PM Subject: [jQuery] AjaxCFC Can anyone who uses ajaxCFC tell me how to get a reference to the calling objects scope in the success handler? I can't figure out how to pass arguments through to the callback / success handler. Anyone? FYI, I am using the jQuery version of ajaxCFC. Works awesome BTW. BrookD.
[jQuery] Re: AjaxCFC
As far as passing args through the callback/success proces, I usually set a var before the ajaxCFC call and then use it inside the callback: var yadda = 'ya'; and inside the callback: if (yadda == 'ya') Not sure what you mean about scope, though, but maybe you mean something like: $myJqVar = $('#someDiv'); and inside the callback: $myJqVar.html('something'); ? - Jack Brook Davies wrote: Can anyone who uses ajaxCFC tell me how to get a reference to the calling objects scope in the success handler? I can't figure out how to pass arguments through to the callback / success handler. Anyone? FYI, I am using the jQuery version of ajaxCFC. Works awesome BTW... BrookD.
[jQuery] Re: ajaxcfc - if ajax call fails - how does it get handled?
From what you have written it looks like you are just taking a stab in the dark - do you use ajaxCFC? On 9/25/07, Alexander Bilbie [EMAIL PROTECTED] wrote: It's just 'failure' then function etc.. So from your script: $.AjaxCFC({ url: /packages/ajax/primaryInvitee .cfc, method: addInvitee, data: options, success: function(r) { thisCheck = check_ + r.LOGINID; thisLoad = load_ + r.LOGINID; if( r.RESULT 0){ $('#'+thisLoad).attr(src,/pics/icon_tick_grey.gif); }else{ $('#'+thisCheck).css(display,); $('#'+thisLoad).css(display,none); } //sDumper(r); }, failure: function(r) { $('#'+thisCheck).css(display,); $('#'+thisLoad).css(display,none); } }) On 24/09/2007, Duncan [EMAIL PROTECTED] wrote: I have a page that submits checkboxes as they are checked on the way down a form. The click hides the checkbox for a loading gif, submits the ID via ajax, and on its return changes the loading icon to a tick image. What I want to know is how to handle a failure of the ajax request. currently I have the following: $.AjaxCFC({ url: /packages/ajax/primaryInvitee.cfc, method: addInvitee, data: options, success: function(r) { thisCheck = check_ + r.LOGINID; thisLoad = load_ + r.LOGINID; if(r.RESULT 0){ $('#'+thisLoad).attr(src,/pics/icon_tick_grey.gif); }else{ $('#'+thisCheck).css(display,); $('#'+thisLoad).css(display,none); } //sDumper(r); } I cant find a failure equivalent to success:. What about a timeout? How would I handle this? Thanks in advance! -- Duncan I Loxton [EMAIL PROTECTED] -- Kind Regards, Alex Bilbie Freelance website and graphics design Quite Good Media Ltd m: 07923 272797 -- Duncan I Loxton [EMAIL PROTECTED]
[jQuery] Re: ajaxcfc - how to write default error handler
Can anyone help me out with overriding the default error handler in ajaxcfc? On 9/24/07, Duncan [EMAIL PROTECTED] wrote: I am using the new ajaxcfc version in jquery and I want to know how to override the default and write my own error handler. I am trying to catch a timeout. can anyone point me in the right direction? -- Duncan I Loxton [EMAIL PROTECTED] -- Duncan I Loxton [EMAIL PROTECTED]
[jQuery] Re: ajaxcfc - how to write default error handler
Duncan, I'll take a look at it. While jQuery is included in AjaxCFC, most people on this list don't code in CF so you may not get a quick reply. Rob Gonda and I will be setting up a support area http://ajaxcfc.com. Rey Bango... Duncan wrote: Can anyone help me out with overriding the default error handler in ajaxcfc? On 9/24/07, Duncan [EMAIL PROTECTED] wrote: I am using the new ajaxcfc version in jquery and I want to know how to override the default and write my own error handler. I am trying to catch a timeout. can anyone point me in the right direction? -- Duncan I Loxton [EMAIL PROTECTED]
[jQuery] Re: ajaxcfc - how to write default error handler
Hi Rey Thanks for your response - after much trial and error I have worked out the following: Turn off the default handler: $.AjaxCFCHelper.setUseDefaultErrorHandler(false); In the $.AjaxCFC() use error: $.AjaxCFC({ url: /packages/ajax/primaryInvitee.cfc, method: addInvitee, data: options, error: function(r){ alert('All FUBAR.'); }, success: function(r) { sDumper(r); } }); If for example the server goes down or you get a connection error this will display an alert. This error method seems to for if the server goes down (i.e. you get a connection error), the cfc has errors in it, or it doesn't exist. This is definitely worth documenting, as when this goes to production I don't want users getting the default error handler with the popup window. In fact (and I know you will get to it eventually) any documentation for the jQuery version would be awesome. I have thus far done all this work blind by trial and error! It seems to work in these scenarios I have tested, however this isnt an exhaustive list of possibilities. Duncan On 9/26/07, Rey Bango [EMAIL PROTECTED] wrote: Duncan, I'll take a look at it. While jQuery is included in AjaxCFC, most people on this list don't code in CF so you may not get a quick reply. Rob Gonda and I will be setting up a support area http://ajaxcfc.com. Rey Bango... Duncan wrote: Can anyone help me out with overriding the default error handler in ajaxcfc? On 9/24/07, Duncan [EMAIL PROTECTED] wrote: I am using the new ajaxcfc version in jquery and I want to know how to override the default and write my own error handler. I am trying to catch a timeout. can anyone point me in the right direction? -- Duncan I Loxton [EMAIL PROTECTED] -- Duncan I Loxton [EMAIL PROTECTED]
[jQuery] Re: AjaxCFC and jQuery Suggest
I haven't seen that one, but the autosuggest by Dan Switzer is great. http://www.pengoworks.com/workshop/jquery/autocomplete.htm andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Duncan Sent: Monday, August 13, 2007 8:19 PM To: jquery-en@googlegroups.com Subject: [jQuery] AjaxCFC and jQuery Suggest All, I am new to jquery and have discovered some of the many cool things it can do so easily. We are long time users of ajaxCFC from Rob Gonda, and I am in the process of moving code from DWR to jQuery. We currently use a Suggest class with DWR ajaxCFC that can be seen here http://www.sixfive.co.uk/index.cfm/2007/8/1/ajaxCFC-Multiple-Suggest-on-one- page I am looking to convert this over to jQuery and found the http://www.vulgarisoip.com/ suggest for jQuery. Has anyone used this with ajaxCFC yet? If so, do you have an example? Does anyone have a Suggest example that already works with JQuery ajaxCFC? Thanks in advance! -- Duncan I Loxton [EMAIL PROTECTED]