logo
Tags down

shadow

Get POST data in Coldfusion, not in Form


By : Omar Duadu
Date : October 16 2020, 06:10 AM
may help you . I need to send data in POST to Coldfusion and retrieve them. The call will be: , Oh I found
code :
getHttpRequestData().content


Share : facebook icon twitter icon

JQuery equivalent of Coldfusion navigate, with post of FORM data?


By : user2180939
Date : March 29 2020, 07:55 AM
this one helps. http://api.jquery.com/load/ if you want basic loading of cfdiv
Submitting the form.... use a combo of ajax and manipulation functions

Coldfusion post form to cfc asynchronously


By : user3276378
Date : March 29 2020, 07:55 AM
wish of those help An asynchronously post is only useful if you want the user to interact with the webpage the form is on while in the background uploading the form. If this is what you want you should/can use jquery.
If synchronously is also an option. Then upload the form to a .cfm file, run the cfc on the .cfm document wait for the response of the component and then redirect the .cfm document using cflocation to a webpage that informs the visitor its upload has been processed. (use cflocation to prevent multiple submits).
code :
<form action="upload.cfm" enctype="multipart/form-data" method="post">
<input type="file" id="xlsfile" name="xlsfile" required>
<input type="submit" value="Upload XLS">
</form>
<cfset yourComponent = createObject('component','/cfc/ee')>
<cfset response = yourComponent.functionName(form.xlsfile)>
<Cflocation url="done.cfm">
<html>....</html>

Post form data to Fw/1(Coldfusion) controller function using AJAX


By : Bhuwan Sapkota
Date : March 29 2020, 07:55 AM
To fix this issue I finally found the solution. There were many mistakes in my program. I will post it so that if somebody runs into similar problems, they can reference the code. I will include the main changes in the comments.
submitForm.js
code :
$(document).ready(function() {
    $('#submitForm').submit(function(event){
        var dataString = $('#submitForm').serialize();
        $.ajax({
        type: 'POST',
        url: 'index.cfm?action=main.submit',
        data: dataString,
        dataType: 'json'
        })
        .done(function(response){

            console.log(response);

        })
        .fail(function(response) {

            console.log(response);

        });

    //I didnt prevent the default event from firing
    event.preventDefault();

    });
});

ColdFusion CFHTTP Post to remote form does not return the results page, it just returns the input form


By : user3776723
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Hey Rich, the reason why you are being shown the form instead of your expected results is because the "verification.jsp" template expects you to have a valid session when you hit it to view the results. does not maintain state on it's own, so a project like Ben Nadel's CFHttpSession.cfc might help. CFHttpSession will manage cookies (and thus session) inbetween calls by interpreting Set-Cookie header results and adding them back in on subsequent calls.
One other thing that I noticed when looking at the server's response headers was that the session cookie (jsessionId) was being set to 'secure'. This means that the cookie can only be used by secured connections. I don't have SSL set up in my test environment so my attempts in using Ben's object failed, but I would think that there is a good chance for it work if you can test under an SSL connection.

post form multidimensional array in coldfusion


By : Robert Rodriguez
Date : March 29 2020, 07:55 AM
Does that help You can't just call a form field "answers[1][]" and hope that some how ColdFusion will work out that string - because that's all "answers[1][]" is: a string - is supposed to be interpreted as an array reference. CF doesn't work like that.
Even if it did work like that, you'd need to put a value in the second dimension of the array notation: answers[1][] is not valid CFML.
shadow
Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk