i just use jquery's .load and and other ajax functions

all i do is include jquery in my layout. i personally don't use the
ajax helper.  it comes down to rendering your ajax data views without
a layout, using jquery to load the results.

ex. i need to get a list of users. in my view i call .load(http://
mysite.com/users/getList/<?= $id ?>) . the users controller has a
function called get list that takes $id as a parameter and runs a find
call on the users table. it then passes that data off to the view for
users/getList. in the controller i specify to use ajax layout (which
basically means plaintext).

there are several examples of using jquery with cakephp but until
version 1.3 comes out with it's jquery friendly javascript/ajax helper
i stick to doing it like this.

On Jul 30, 9:25 am, matalina <matal...@gmail.com> wrote:
> I have a basic application created.  I have a list of categories, a
> list of items that can be part of only one category, and a list of
> these items.  Currently the application requires that you create the
> list, and then you would add each item to the list through a separate
> interface. (at least that's how the base seems to have been baked).
>
> I want to create my list, add the items to the list before ever
> sending and storing any information in the database.  I have done this
> particular application outside of cake and to make a list as long as I
> want I used jQuery to help me with my ajax calls.
>
> While I could easily do this the way I had originally but I'm pretty
> sure this breaks the MVC model of cakephp so I'm hoping someone can
> tell me how ajax works with cakephp? Where are the files kept that the
> ajax call would run with out a page refresh? How do I access these
> files?
>
> The basic function I want is.
>
> Fill in the basic list information - namely the name and then click a
> button that brings up a drop down menu for the list of items.  Choose
> an item, add the quantity required and then click the button again to
> add another item, until you are finished creating your list.  Then
> when all your items are added click the submit button and send, verify
> and store the data in the database.
>
> I don't want to break the model so I'm hoping I can do what I want
> with in cakephp but I need some assistance as to how to implement this
> type of ajax feature with in the model.
>
> Thanks for your help in advance.
--~--~---------~--~----~------------~-------~--~----~
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