I want to use the Ajax inPlaceEditor and I can't get it working :
I have this in index view: (It work fine)
<h3 id="edit"><?php echo $post['Topic']['title'] ?></h3>
<?php echo $ajax->editor('edit', 'updateTitle' ); ?>
Then in PostsController I have the function updateTitlte :
function updateTitle($id){
$this->Post->id = $id;
$this->Topic->saveField('title', ???); //Here is where my
problems are
$this->set('postTitle', ???);
$this->layout = 'ajax';
}
And the view update_title.ctp
<?php echo $postTitle;?>
My problem is that I don't know how to get the new value of title. I
thought it would be in $this->data, but it's empty. Maybee I do
something wrong and $this->data should'nt be empty or maybee the new
value is somewhere else.
I would be very happy if someone could give me some advices on this.
Thank you in advance
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---