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", {
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
:'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
.
-- 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
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
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
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
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
8 matches
Mail list logo