I'm creating an ajax form but it's not working and I can't figure out
why.

The view to the ajax form is:

$ajax->form('/authors/add','post',array('url' => '/authors/add',
'update'=>'DivAddAuthor'));
$form->input('name');
$ajax->submit('Add', array('url' => '/authors/add',
'update'=>'DivAddAuthor'));
$form->end();

I have the helpers defined in the controller

var $helpers = array('Html', 'Form','Ajax','Javascript');

And the controller code is:

        function add() {
                if (!empty($this->data)) {
                        $this->Author->create();
                        $this->Author->save($this->data);
                }
                $this->render('add','ajax');
        }

Could you help me? Am I missing something?

Hugo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to