Re: SOT: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread James Holmes
You need to JSON.parse() the result. On Fri, Aug 15, 2008 at 12:39 AM, Andy Matthews <[EMAIL PROTECTED]> wrote: > I'm using jQuery to make a direct CFC call, with the optional returnFormat > parameter. > > Here's the get call: > > $.get("coupons.cfc?method=getSingleCoupon", {

RE: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Andy Matthews
Josh... getJSON works perfectly. Thanks! -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2008 12:28 PM To: CF-Talk Subject: Re: Using jQuery to access the JSON that CF8 returns? Your console.log output is showing a string. If you set the

RE: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Andy Matthews
:'JSON' },function(d){ var o = eval("("+d+")"); }); That does it. Thanks to everyone who offered help! -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2008 12:08 PM To: CF-Talk Subject: RE: Using jQuery to access t

Re: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Josh Nathanson
. -- Josh - Original Message - From: "Andy Matthews" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Thursday, August 14, 2008 10:07 AM Subject: RE: Using jQuery to access the JSON that CF8 returns? > Nope... > > I'm specifying returnFormat: JSON as one of the

RE: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Andy Matthews
s, or undefined. -Original Message- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2008 11:54 AM To: CF-Talk Subject: Re: Using jQuery to access the JSON that CF8 returns? The $.get method of jQuery should have the parameter "dataType: 'json'" or you

Re: SOT: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Matt Williams
On Thu, Aug 14, 2008 at 11:39 AM, Andy Matthews <[EMAIL PROTECTED]> wrote: > I'm using jQuery to make a direct CFC call, with the optional returnFormat > parameter. > d['DATA'][0][1]; > > But when I do so in Firefox, using Firebug I get the error: > > d.DATA has no properties > coupons.js > Line 6

Re: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Josh Nathanson
t;[EMAIL PROTECTED]> To: "CF-Talk" Sent: Thursday, August 14, 2008 9:39 AM Subject: SOT: Using jQuery to access the JSON that CF8 returns? > I'm using jQuery to make a direct CFC call, with the optional returnFormat > parameter. > > Here's the get call

SOT: Using jQuery to access the JSON that CF8 returns?

2008-08-14 Thread Andy Matthews
I'm using jQuery to make a direct CFC call, with the optional returnFormat parameter. Here's the get call: $.get("coupons.cfc?method=getSingleCoupon", { couponid: couponid, siteid: siteid, returnFormat:'JSON' },function(d){ // alert(d['DATA'][0