Hi Ray,
it is me again and sorry to bother again. i had my code working with ajax "Get" 
and JSONUtil.cfc. So, my data loads perfects. 
I want to know if you have any example on how i do now use ajax "POST" to 
update my data (with JSONUtil). Here my code :


$parent.find('button[name=save]').click(function () {
                                                                                
                  
  $.ajax({
    url: "save_proxy.cfm",
    data: {"data": handsontable.getData()}, //returns all cells' data
    dataType: 'json',   
    type: 'POST',
    success: function (res) {
      if (res.result === 'ok') {
                 
        $console.text('Data saved');
                
      }
      else {
        $console.text('Save error');
      }
    },
    error: function () {
      $console.text('Save error. POST method is not allowed on GitHub Pages. 
Run this example on your own server to see the success message.');
          
    }
  });
  // stop propagation of the save button click event
  return false;
});
 


and here my save_proxy.cfm:


<cfinvoke 

   component="JSONUtil" 
   method="deserializeFromJSON"
   returnVariable="rtn_result">
   <cfinvokeargument 
      name="JSONVar" value="data">     
    <cfinvokeargument 
      name="strictMapping" value="true">  
      
</cfinvoke>

<cfoutput>#rtn_result#></cfoutput>



Any help on that ?

thanks





>Please use the regex I posted yesterday. Did you see it?
>
>
>On Thu, Nov 22, 2012 at 9:14 AM, Mo Lay <[email protected]> wrote:
>
>> 

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

Reply via email to