Re: Ajax Post Value on CF Side

2015-04-07 Thread Dean Lawrence

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 rharri...@aimg.com wrote:


 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.118
 Direct Line: 516-302-4345
 www.aimg.com



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360420
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Ajax Post Value on CF Side

2015-04-07 Thread Jon Clausen

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, Robert Harrison (rharri...@aimg.com) wrote:


I'm sending an Ajax post to a CF page. The post data looks like (below) in 
the counsel: 



Object {name: rid, value: 1} 



How in the heck to I get that value on the ColdFusion page? 





Robert Harrison 
Full Stack Developer 
AIMG 
mailto:rharri...@aimg.com rharri...@aimg.com 
Main Office: 704-321-1234 ext.118 
Direct Line: 516-302-4345 
http://www.aimg.com/ www.aimg.com 











~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360415
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Ajax Post Value on CF Side

2015-04-07 Thread Robert Harrison

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.118
Direct Line: 516-302-4345
www.aimg.com



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360419
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Ajax Post Value on CF Side

2015-04-07 Thread Phillip Vector

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 rharri...@aimg.com wrote:


 I'm sending an Ajax post to a CF page.  The post data looks like (below) in
 the counsel:



 Object {name: rid, value: 1}



 How in the heck to I get that value on the ColdFusion page?





 Robert Harrison
 Full Stack Developer
 AIMG
  mailto:rharri...@aimg.com rharri...@aimg.com
 Main Office: 704-321-1234 ext.118
 Direct Line: 516-302-4345
  http://www.aimg.com/ www.aimg.com









 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360414
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Ajax Post Value on CF Side

2015-04-07 Thread Robert Harrison

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.

Too simple, so it confused me.  


Robert Harrison
Full Stack Developer
AIMG
rharri...@aimg.com
Main Office: 704-321-1234  ext.118
Direct Line: 516-302-4345
www.aimg.com




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360421
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Ajax Post Value on CF Side

2015-04-07 Thread Dean Lawrence

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 rharri...@aimg.com wrote:


 I'm sending an Ajax post to a CF page.  The post data looks like (below) in
 the counsel:



 Object {name: rid, value: 1}



 How in the heck to I get that value on the ColdFusion page?





 Robert Harrison
 Full Stack Developer
 AIMG
  mailto:rharri...@aimg.com rharri...@aimg.com
 Main Office: 704-321-1234  ext.118
 Direct Line: 516-302-4345
  http://www.aimg.com/ www.aimg.com









 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360418
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Ajax Post Value on CF Side

2015-04-07 Thread Robert Harrison

I'm sending an Ajax post to a CF page.  The post data looks like (below) in
the counsel:

 

Object {name: rid, value: 1} 

 

How in the heck to I get that value on the ColdFusion page?

 

 

Robert Harrison
Full Stack Developer
AIMG
 mailto:rharri...@aimg.com rharri...@aimg.com
Main Office: 704-321-1234  ext.118
Direct Line: 516-302-4345
 http://www.aimg.com/ www.aimg.com



 

 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360413
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm