Copy link to clipboard
Copied
I have a jQuery that sends the data via post to my proxy ColdFusion page. However, in the this page, I'm not sure how to go about retrieving those values. I tried to log the following in my CFHTTP tag:
<cflog text="URL: #URL#" type="Information" file="CGIparameters">
<cflog text="URL-Name: #URL.name#" type="Information" file="CGIparameters">
But I always get this error:
"NetworkError: 500 Complex object types...erted to simple values. - https://devbox.mysite.com/customcf/kb/proxyPost-KB.cfm"
This is the JavaScript that's posting to the proxy page. However, I don't think there is anything wrong with the JavaScript. I tried putting static values in the CFHTTPPARAM and there is no errors. It was able to send the data to JSON API.
- $(function(){
- $("##frmComment").submit(function(event){
- event.preventDefault();
- $("##submitResponse").append('<img src="../../../assets/mysite/img/ajax-loader.gif" class="progressGif">');
- // Cache $form, we'll use that selector more than once
- var $form=$(this);
- var data = $form.serialize(); //get all the data of form
- //post it
- $.post(
- "/customcf/kb/proxyPost-KB.cfm",
- data,
- //console.log(response),
- function(response){
- // Success callback. Remove your progress gif, eg:
- //$('body').removeClass('in-progress');
- console.log(response);
- // Remove the spining gif from the div
- $("##submitResponse img:last-child").remove();
- //Remove the feedback form
- $("##frmComment").remove();
- $form.fadeOut('slow', function(){
- //Add response text to the div
- $("##submitResponse").append("<h6>Thank you for your feedback.</h6>");
- $("##submitResponse").html(response).fadeIn('slow');
- });
- });
- });
- })
1 Correct answer
They will be in the FORM or URL scope. This is a very basic question and there are many sources available to learn CF very quickly that you'll want to check out. Here is a thread with a couple: What is the best way to learn ColdFusion
Copy link to clipboard
Copied
They will be in the FORM or URL scope. This is a very basic question and there are many sources available to learn CF very quickly that you'll want to check out. Here is a thread with a couple: What is the best way to learn ColdFusion
Copy link to clipboard
Copied
Thanks! I forgot I was supposed to use form scope for post and url for get.

