Note that there are some explanatory texts on larger screens.

plurals
  1. POSending all of form scope to a CFC asynchronously
    primarykey
    data
    text
    <p>Currently working on trying to figure out asynchronous submission in ColdFusion. I always have trouble with this. I have a form that I want to submit to a remote CFC and get some sort of response back. (Eventually this form is going to have a draft like function...) I know how to set up each part: the form and the CFC. My problem is connecting them!!! There was some similar post about this, but none offer sufficient information....for me at least.</p> <p>Form:</p> <pre><code>&lt;cfform action = "/cfc/request.cfc?method=updateRequest" method = "post" name = "requestForm" id = "requestForm" enctype="multipart/form-data"&gt; ........&lt;!-- Fields redacted --&gt; &lt;/cfform&gt; </code></pre> <p>CFC Method (this was just a test):</p> <pre><code>&lt;cffunction name="updateRequest" access="remote" returntype="numeric"&gt; &lt;cfargument name="form" type="struct" required="yes"&gt; &lt;cfset var status = 0&gt; &lt;cfreturn status&gt; &lt;/cffunction&gt; </code></pre> <p>Note: my CFC function is set to remote etc. etc. etc...</p> <p>I have my form here which should post to the cfc, however it actually <em>goes</em> to the cfc page. I don't want this. I've grown so frustrated with trying to use ajax with ColdFusion. I'm ready to resort to just using jQuery to submit it. I can do it jQuery...however I don't know how to get the fields into a struct. (This form is going to be large...) I'd like to see how to send form information as a struct in either ColdFusion or jQuery. I want to be able to retain the form field names.</p> <p>Even if someone could point me in the right direction...that would be great. I've tried to find a GOOD tutorial on this for sometime and have not been able too.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload