title: How to access return value from coldfusion.ajax.submitform?
body: <p>Having real trouble wrapping my head around coldfusion.ajax.submitform. I have the call to my cfc working, data gets saved to my db, however I don't receive (or haven't set-up properly) a way to receive a message that the method call was successful. Here's my code:</p>
  
  <pre><code>&lt;cfcomponent&gt;
  &lt;cffunction name="postFeedback" access="remote" returntype="boolean"&gt;
    &lt;cfargument name="name" type = "string" required="yes"&gt;
        &lt;cfargument name="email" type = "string" required="yes"&gt;
        &lt;cfargument name="post" type = "string" required="yes"&gt;
        &lt;cfquery name="postFeedback" datasource="myDB"&gt;
      Insert into feedback (name, email, post, date)
      Values('#ARGUMENTS.name#','#ARGUMENTS.email#','#ARGUMENTS.post#', #Now()#);
      &lt;/cfquery&gt;
      &lt;cfreturn true&gt;
  &lt;/cffunction&gt;
  &lt;/cfcomponent&gt;
  </code></pre>
  
  <p>Here's my ajax call:</p>
  
  <pre><code>function submitForm() {
     ColdFusion.Ajax.submitForm('myForm1', 'Feedback.cfc?method=postFeedback', callback, errorHandler);
  
  }
  
  function callback(text)
  {
      alert("Callback: " + code + ": " + msg);
  }
  
  
  function errorHandler(code, msg)
  {
      alert("Error!!! " + code + ": " + msg);
  }
  </code></pre>
  
  <p>I eventually want to understand how to access returned values so that I can use a method like 'getFeedback' and populate fields. I can already do this with cfinvoke but I'm looking to do this via a button click. I need to crawl before I can walk. ;) </p>
  
  <p>Any guidance would be appreciated.</p>
  
  <p>Thanks</p>