I'm pretty new to Cake, so forgive me if I ask something really stupid.

I would like to do an Ajax update to a different table than my current
model, but I can't figure out how to this.

My view does a POST like
field   Common_Name
id      2
value   test_value

The name of the table is stored in a Session variable (different for
each user)
$this->Session->read('dataset'))

My Model is called Cm, and just looks like
<?php
class Cm extends AppModel
{
    var $name = 'Cm';
}
?>

I post to /cms/update, and have a controller like
<?php
class CmsController extends AppController
{
    var $name = 'Cms';
    var $helpers = array('Html', 'Head');

    function update() {
    $this->layout = 'ajax';

    $this->Cm->useTable=$this->Session->read('dataset'));

$this->Cm->saveField($this->params['form']['field'],$this->params['form']['value']);
}

Nothing seems to happen.


--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to