Solved. The problem was I was overcomplicating this and treating it like
JSON just like everyone else has been advising.
With an AJAX post, the string: Object {name: "rid", value: "1"}
Appears to Coldfusion as form values. The values #form.name# and
#form.value# give me "rid" and "1".
Once you convert it into a CF structure using deserializeJSON, you can then
use cfdump to see how CF interprets it.
On Tue, Apr 7, 2015 at 12:31 PM Robert Harrison wrote:
>
> Let me make this simpler. The value being send via an ajax post is:
>
> Object {name: "rid", value: "1"}
>
> If I just
Let me make this simpler. The value being send via an ajax post is:
Object {name: "rid", value: "1"}
If I just want to dump that value/object how to I do it? I have no idea
what name CF see that as.
Robert Harrison
Full Stack Developer
AIMG
rharri...@aimg.com
Main Office: 704-321-1234 ext.1
You can very easily convert it to a structure using the deserializeJSON
function in CF. Here is a link with some examples of working with JSON in
ColdFusion. http://www.learncfinaweek.com/week1/JSON/
On Tue, Apr 7, 2015 at 11:55 AM Robert Harrison wrote:
>
> I'm sending an Ajax post to a CF pag
With JQuery:
var post_data = $('#myform').serializeArray();
$.post('/mycfpage',post_data,function(data){
//do stuff with JSON data here
var name = data.name;
var value = data.value;
//then manipulate the DOM from there
},'json');
On April 7, 2015 at 11:55:47 AM, Rob
Looks like a basic JSON value. Just parse it and you should have it put
into a variable.
or am I not understanding the question? I have yet to have my morning
coffee.
On Tue, Apr 7, 2015 at 8:55 AM, Robert Harrison wrote:
>
> I'm sending an Ajax post to a CF page. The post data looks like (be
6 matches
Mail list logo