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',
                        c: 'charlie',
                        d: 'devon'
                },
                type: 'post',
                success: callBack
        });

-----Original Message-----
From: Tony Bentley [mailto:[email protected]] 
Sent: Thursday, April 29, 2010 11:16 AM
To: cf-talk
Subject: jquery $.ajax - need help with json syntax


I need to pass 4 arguments and for this purpose, lets use a,b,c,d

var data = {"argumentCollection":{?????}};

        $.ajax({
                url: "cfc/mycfc.cfc?method=dbupdate",
                dataType: 'json',
                data: data,
                type: 'post',
                success: callBack
        });
Where data = ??? I know that when using the coldfusion ajax proxy I need to
pass argumentCollection as a parameter. Also, one of the arguments is an
object with different data types. (ie - a.string, a.int, a.boolean, etc)

Obviously the 'data' variable is wrong. Has anyone been able to post data
using this method? 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333236
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to