RE: jquery $.ajax - need help with json syntax

2010-04-29 Thread Rick Faircloth
yeah, true...thanks, Matt! -Original Message- From: Matt Quackenbush [mailto:quackfu...@gmail.com] Sent: Thursday, April 29, 2010 4:32 PM To: cf-talk Subject: Re: jquery $.ajax - need help with json syntax On Thu, Apr 29, 2010 at 2:43 PM, Rick Faircloth wrote: > Now, what exac

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Tony Bentley
Or better put, a json structure inside of a json structure :-) arguments.a = DeserializeJSON(arguments.a); This is then referenced as a ColdFusion structure with members ~| Want to reach the ColdFusion community with something

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Matt Quackenbush
On Thu, Apr 29, 2010 at 2:43 PM, Rick Faircloth wrote: > Now, what exactly does the 'a': {"a":a.cat,"b":a.dog,"c"} > do? An array for "a" ??? > No, that would be the equivalent to a ColdFusion struct. a = { a = a.cat, b = a.dog, c = "" };

RE: jquery $.ajax - need help with json syntax

2010-04-29 Thread Andy Matthews
itestonemedia.com] Sent: Thursday, April 29, 2010 2:43 PM To: cf-talk Subject: RE: jquery $.ajax - need help with json syntax Ok...you lost me. Now, what exactly does the 'a': {"a":a.cat,"b":a.dog,"c"} do? An array for "a" ??? Rick -Original

RE: jquery $.ajax - need help with json syntax

2010-04-29 Thread Rick Faircloth
Ok...you lost me. Now, what exactly does the 'a': {"a":a.cat,"b":a.dog,"c"} do? An array for "a" ??? Rick -Original Message- From: Tony Bentley [mailto:cascadefreehee...@gmail.com] Sent: Thursday, April 29, 2010 1:27 PM To: cf-tal

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Scott Stewart
no problem :) On Thu, Apr 29, 2010 at 1:27 PM, Tony Bentley wrote: > > Okay I figured it out: > > >        var data = { >                'a': {"a":a.cat,"b":a.dog,"c":a.etc}, >                'b': b, >                'c': c, >                'd': d >        }; > > Thanks everyone for the help. I

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Tony Bentley
Okay I figured it out: var data = { 'a': {"a":a.cat,"b":a.dog,"c":a.etc}, 'b': b, 'c': c, 'd': d }; Thanks everyone for the help. It helped me out quite a bit. ~

RE: jquery $.ajax - need help with json syntax

2010-04-29 Thread Josh Nathanson
29, 2010 9:53 AM To: cf-talk Subject: Re: jquery $.ajax - need help with json syntax If I use serialize I get nothing passed as a post argument. I am requiring all args and I get the error as normal, "...required but not passed in". var dat = {

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Sean Coyne
>So then how would I reference an object with members? a.member, a.friend, etc. > >I tried a:a and 'a':a but neither works. data: { a: { member: "value", friend: "value" }, b: "value", c: 2, d: true } ~| Want to reach the ColdF

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Sean Coyne
>So then how would I reference an object with members? a.member, a.friend, etc. > >I tried a:a and 'a':a but neither works. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fus

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Joel Watson
If "dat" is already an object literal (as below), why do you need to serialize it? Doesn't the the ajax() data take care of that for you if passing an object? > If I use serialize I get nothing passed as a post argument. I am > requiring all args and I get the error as normal, "...required

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Scott Stewart
one more shot, after a quick cursory look http://api.jquery.com/jQuery.post/ Check the bottom of the page, I *think* your answer is there.. gotta get back to the grind.. On Thu, Apr 29, 2010 at 12:54 PM, Tony Bentley wrote: > > So then how would I reference an object with members? a.member, a.f

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Tony Bentley
So then how would I reference an object with members? a.member, a.friend, etc. I tried a:a and 'a':a but neither works. >I find that it's easier, and more self-documenting, to enumerate the >variables in data directly: > > $.ajax({ > url: "cfc/mycfc.cfc?method=dbupdate", >

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Tony Bentley
If I use serialize I get nothing passed as a post argument. I am requiring all args and I get the error as normal, "...required but not passed in". var dat = { 'OBJ': obj, 'VAL': val, 'ATTR': attr,

Re: jquery $.ajax - need help with json syntax

2010-04-29 Thread Scott Stewart
Tony, I think what your looking for is "serialize". data:$("data").serialize(), On Thu, Apr 29, 2010 at 12:15 PM, Tony Bentley wrote: > > I need to pass 4 arguments and for this purpose, lets use a,b,c,d > > var data = {"argumentCollection":{?}}; > >        $.ajax({ >                url:

RE: jquery $.ajax - need help with json syntax

2010-04-29 Thread Andy Matthews
I find that it's easier, and more self-documenting, to enumerate the variables in data directly: $.ajax({ url: "cfc/mycfc.cfc?method=dbupdate", dataType: 'json', data: { a: 'andy', b: 'bobby',