This is probably the basics of AJAX in CakePHP, but I'm going to ask
anyway. I'll use a simple example to explain my question.

There's an index method and add method inside PostsController. The
index displays a list of posts. In the index view, I want a form that
will submit to the add method, and update the index view with the added
post using AJAX (no page refresh).

So, in the index view, I have a div that contains the list of posts.
I'm assuming I can use $ajax->form('Posts/add', 'post', array('update'
=> 'posts_div')) to update the div. How does the add method come into
play when updating the div? Does the add view end up being used to
update posts_div? Do I have to render a partial. (I'm not really sure
what render a partial means, but I'm willing to learn if it's
necessary.)


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

Reply via email to