Try $.getJSON instead of $.ajax for a little more efficiency.

cfajaxproxy is the JS way of getting to the same point, essentially.
With either method, you need to be able to write the JS you need to
use the result set. You're getting back an object with two properties:
COLUMNS and DATA. COLUMNS is an array; DATA is an array of arrays. So
yes, there's going to be some looping involved.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2009/2/4 Rick Faircloth <[email protected]>:
>
> The call that I've been using is
>
> $.ajax({  cache:     false,
>          type:      "post",
>          url:       "../components/floor_duty.cfc?method="get_duty_schedule",
>          dataType:  "json",
>          data:      "formval",    <--- form values, etc., are put into this 
> variable
>          success:   function(response) {
>
>                     etc...
>
> and in the cfc method, I specify returnFormat = "json".
>
> I looked over the Adobe docs and another resource I found,
> but I've got to tell you, I couldn't figure out what to do
> with the information.
>
> Am I supposed to make use of "cfajaxproxy" tag or Spry or what?
> From looking at the example in the docs for using an asynchronous
> CFC proxy, it's quite complicated.  Will I have to learn how
> to loop over the data from the ajax call using javascript to be
> able to use the data on my calling page?
>
> I hope there's a much simpler answer than what I'm suspecting.
> I was just hoping I'd be able to use the struct (structSchedule
> in my code) much like I would a cfquery.
>
> Rick
>
>
>
>
>
>> -----Original Message-----
>> From: James Holmes [mailto:[email protected]]
>> Sent: Tuesday, February 03, 2009 10:01 PM
>> To: cf-talk
>> Subject: Re: This CFC function and jQuery Ajax stuff is killing me...
>>
>>
>> I should have added that I was wondering how you used jQuery to do the
>> Ajax call, since $.getJSON() should automatically convert the JSON to
>> data:
>>
>> http://docs.jquery.com/Ajax/jQuery.getJSON
>>
>> mxAjax / CFAjax docs and other useful articles:
>> http://www.bifrost.com.au/blog/
>>
>>
>>
>> 2009/2/4 Rick Faircloth <[email protected]>:
>> >
>> > Thanks for the tips, James... I'll see what I can do!
>> >
>> > Rick
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:318832
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to