I'm upgrading a component, select dependent. That actually works, but the 
code is not completely standardized.

http://phpyalgomas.blogspot.com/2012/03/selects-dependientes-para-cakephp.html

With this configuration (current) I get the data as *Form Data.* See the 
screenshot

 var AjaxRequest = function(config_obj,obj){
     var set_obj ={
         type: config_obj.type,
         url: config_obj.url,
         data: obj,
         global: false,
         complete: function(response){
             config_obj.callbacks.complete(response);
         }
     }
     if(config_obj.console_log){
        jQuery('#debug').load(set_obj.url,set_obj.data,function(response, 
status,xhr){ config_obj.callbacks.complete(xhr); });
     }else{
        jQuery.ajax(set_obj);
     }
 }


<https://lh5.googleusercontent.com/-iDJ6iO6n-Sk/UYIpZFj-uWI/AAAAAAAAA2c/bcG8H9NoprU/s1600/Captura+de+pantalla+de+2013-05-02+04%3A21%3A53.png>



*With this configuration: The update, I do not get any data in the 
controller. * See the screenshot

var AjaxRequest = function(config_obj,obj){
    if(config_obj.console_log){
        var set_obj ={
            type: config_obj.type,
            url: config_obj.url,
            contentType: "application/json; charset=UTF-8",
            dataType: 'json',
            data: JSON.stringify(obj),
            global: false,
            complete: function(response){
                $('#debug').html(response.responseText);
                config_obj.callbacks.complete(response);
            }
        }
        $.ajax(set_obj);
    }else{
        var set_obj ={
            type: config_obj.type,
            url: config_obj.url,
            contentType: "application/json; charset=UTF-8",
            dataType: 'json',
            data: JSON.stringify(obj),
            global: false,
            complete: function(response){
                config_obj.callbacks.complete(response);
            }
        }
        $.ajax(set_obj);
    }
}



<https://lh4.googleusercontent.com/-V3v1cxIqAjM/UYIq2czg_9I/AAAAAAAAA2o/3No9Tbn2Bmg/s1600/Captura+de+pantalla+de+2013-05-02+04%3A28%3A23.png>



Saludos Amigos. 



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to