Hey Rick,

Like any other form post, you can't pass complex arguments to the server.
What you could do is pass a JSON string and then deserialize it in the CFC.

-- Josh


-----Original Message-----
From: Rick Root [mailto:rick.r...@webworksllc.com] 
Sent: Tuesday, August 11, 2009 5:09 PM
To: cf-talk
Subject: jQuery question


I have a CFC hat accepts a struct as its argument.  The struct can
contain 0 or more items, but the struct itself is required.

I want to use jQuery to call this method.  But I can't figure out how.
 what I'm trying to do is this:

I'm trying to do this as a jquery post...

        var command = {name:''};
        var url='/cfcs/pools.cfc?method=getPoolList&returnFormat=json';
        $.post(url, [command:command], rh_getPoolList, "json");

it is successfully calling the CFC - I have a cfmail in it that emails
me a dump of the arguments.

And arguments.command is a string that looks like this:   [object object]

Instead of a struct.

Any suggestions?
-- 
Rick Root
New Brian Vander Ark Album, songs in the music player and cool behind
the scenes video at www.myspace.com/brianvanderark



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:325359
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