My pleasure. And just FYI. When you run that WDDX tag, it basically returns a string that seems to resemble JSON quite a bit, might actually BE JSON, but I've never inspected it that closely.
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Jordan Sent: Tuesday, February 06, 2007 3:29 PM To: jQuery Discussion. Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) Oh! So you're handling the cfwddx serialization yourself in the cfc... hmmm. Not being familiar with wddx, I wasn't aware it was that simple. Pretty cool. I still think I want to use AjaxCFC (personally), but it's cool to know that this is do-able. Though, using this method I'd still have to modify the CFCs that I want to use. And if I wanted to use them from a non-Ajax-y type call, then I'd have to write code to handle that. The nice thing about AjaxCFC is that I can use my CFC as-is without modification (well... except that they have to extend ajax.cfc...). :o) Thanks for sharing your methods Andy! :o) Chris Andy Matthews wrote: Just so you know, you CAN use jQuery to hit the CFC directly. Here's a sample of code I'm using: js code: function addRecipe(id) { $.get("includes/q.cfc?method=addRecipe&id=" + id,function(result){ eval( 'var ' + result ); $('#shoppingList').html(r.content); }); }; CFC: <cffunction name="addRecipe" access="remote" returntype="void" hint="Adds a recipe to your shopping list"> <!--- set parameters for arguments ---> <cfargument name="id" required="Yes" type="numeric"> <cfset myStruct = structNew()> <cfif NOT ListFind(SESSION.grocerylist,id)> <cfset SESSION.grocerylist = ListAppend(SESSION.grocerylist,id)> </cfif> <cfset myStruct["content"] = Replace(getShoppingList(),"#chr(13)#","","ALL")> <cfwddx action="CFML2JS" input="#myStruct#" toplevelvariable="r"> </cffunction> _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Jordan Sent: Tuesday, February 06, 2007 2:28 PM To: jQuery Discussion. Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) I like that with AjaxCFC, I don't have to reinvent the wheel and can instead use my CFCs directly. True I can still use them, but I've got to have jQuery's in-built ajax methods call a .cfm page which in turn calls my cfc. I'd like to cut out the middle man and go directly to the CFC. Thanks to Rob's hard work on AjaxCFC I can do this. Chris Michael E. Carluen wrote: Hi Andy... are you referring to the one that returns a wddx packet from the cfc using the $.get() directly? As for AjaxCFC, I think I just like the thought of having the extra layer of Error Trapping and Security Check features for CFCs that Rob put in place. What's your thoughts? Thanks, Andy. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Tuesday, February 06, 2007 11:44 AM To: 'jQuery Discussion.' Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) Michael... Have you seen how easy it is to access a CFC directly using jQuery? Dirt simple. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael E. Carluen Sent: Tuesday, February 06, 2007 1:18 PM To: 'jQuery Discussion.' Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) Paul, on simple data retrieval, I find pure jQuery's $.ajax(), $.post(), and $.get() more than sufficient especially when used with .cfm files. AjaxCFC's however would be my preference when I need to invoke my cfc's... of course when its out of alpha. As Rey said, it's a case-by-case. My .02 Paul. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Sent: Tuesday, February 06, 2007 11:12 AM To: 'jQuery Discussion.' Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) That's exactly what I'm looking for, Rey. I've already got my feet wet with jQuery's UI tools, so it sounds like AjaxCFC may be a great way to handle the Ajax stuff. Thanks for the insight. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Tuesday, February 06, 2007 11:57 AM To: jQuery Discussion. Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) Hi Paul, I'm so used to doing things sans AjaxCFC for jQuery that I would probably stick with straight jQuery since its what I'm most accustomed to and I love having greater control over how things are handled. But I'm very torn because Rob's done a GREAT job of abstracting jQuery via AjaxCFC and the functionality he's included such as serialization (js, json & wddx), logging, and CF-based error reporting really attractive. So I'd really have to evaluate things on a case by case basis. I don't think you can go wrong by using AjaxCFC, especially in the beginning where it may make using jQuery much easier for Ajax call manipulation. Remember that AjaxCFC isn't there to help you with UI controls or DOM manipulation. Its biggest feature is the ability to access CF data types easily and work with them during an XMLHttpRequest. You're still going to have to dig into the jQuery API in order to handle non-Ajax functionality. Rey... Paul wrote: Thanks Rey, I found the jQuery example code in the SVN branch. I know you've been pretty excited about jQuery for a while now--your mention of it on the HOF CF list is why I picked it up. Since the AjaxCFC change is still in Alpha you obviously haven't been using it up to this point but I wonder if you were to start a new project now, would you adopt AjaxCFC or just do things the way you have been? I need to start on the server- side implementation of a project and want to make an informed decision if I can... Thanks again. Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Tuesday, February 06, 2007 10:31 AM To: jQuery Discussion. Subject: Re: [jQuery] AjaxCFC (paging Rey Bango...) Hey Paul, I talked to Rob Gonda about the demos and they should be updated to jQuery v1.1.1. As Chris mentioned, when you download it from RIAForge, it should have updated demos. Are they missing? Rey.... Paul wrote: About 2 weeks Rey Bango posted that AjaxCFC had been updated to implement jQuery 1.1, but apparently the ajaxCFC demos have not yet been updated to reflect the change. Since I'm too inexperienced to fumble my way through it properly, can anybody point me to some basic getting-started information regarding ajaxCFC and jQuery together? ------------------------------------------------------------------- ---- - _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ -- http://www.cjordan.info _____ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/ -- http://www.cjordan.info
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
