That depends on the function's attributes. The returnFormat argument will automatically serialize the ColdFusion datatype into a JSON object. I suggest that anyone using it should play with the returns a bit to see what comes back for the different CF datatypes. Most things are fairly standard, with the exception of Adobe's implementation of returning a query. Adobe's implementation provides for a much smaller data return, but it isn't in the standard format used by most other app servers, so it requires a small bit of client-side parsing to get the intended result. Nothing painful, just important to know the difference. I've written a CFQueryReader object for Ext, to parse CF query returns for use with Ext components:
http://blog.cutterscrossing.com/index.cfm/2008/11/20/ColdFusion-Query-Json-Data-Reader Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of "Learning Ext JS" http://www.packtpub.com/learning-ext-js/book _____________________________ http://blog.cutterscrossing.com Dawson, Michael wrote: > I don't even want to know what value that method would return. > > mike > > -----Original Message----- > From: Raymond Camden [mailto:rcam...@gmail.com] > Sent: Sunday, January 11, 2009 9:44 PM > To: cf-talk > Subject: Re: Is it possible to reference a cfc method using ajax? > > Don't forget that in CF8, you can convert a result to JSON over the > wire. So if some CFC, let's call it, um, nose, had a method, pick, that > returned an array, if you did an Ajax call to > > nose.cfc?method=pick&returnFormat=json > > The returnFormat argument will tell the CFC to JSON encode the result. > So there is no need to write a "special" method for the Ajax call. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317777 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4