On Aug 16, 2006, at 4:36 PM, codecowboy wrote:

>
> Hi,
>
> I want to make an ajax call to to a controller action that simply
> returns data that is retrieved from the database.  I don't want the
> action to render a view or anything extra
>
> ex.  pseudo code:
>
> 1 var temp
> 2 ...onclick -> make ajax call
> 3 store value returned from ajax call in temp
> 4 print temp to screen
>
> Is this possible in cake?

pseudo answer:

1. yes!

It works like this

1. AJAX event triggered (by click, or whatever)
2. Cake action called
3. Cake does its database magic
4. Cake renders a "view" that contains only the data you want
5. The rendered "view" is used to update a specified <div>

Check out the AjaxHelper.

-- J

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