Hi,
Im trying for first time work with cake and the jquery frameworks. I
make a function that should save fields when a blur event occurs...
the problem is that Im unable of get the post data send by jquery with
the $.post method...
the jquery code is that: (tested and works without cake):
$('.salvar_descricao').blur(function() {
var id = $(this).attr('id');
var descricao = $('#'+id).val();
var id_num = id.split("_");
$.post('/portfolio_dev/admin/salvarDescricao/',{id: id,
descricao:
id_num[1]}, function(data){
var teste = $('mensagem','descricao');
alert(teste);
});
Ande the controller I put the code
function salvarDescricao($id, $descricao) {
$this->Fotos->id = $id;
if($this->Fotos->saveField('descricao',$descricao)) {
$this->set('salvar',true);
}
else {
$this->set('salvar',false);
}
$this->RequestHandler->setContent('xml');
}//end salvarDescricao
the view its a xml of response if the field was saved...
in firebug I get the message that are missing two parameters...
I need to know how retrieve the information sending by post data to
jquery
I guess thats a better way to get this... any help???
thanks...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---