Re: jQuery $.ajax() and on success result processing?
If you want just to get the rendered view and put its contents into an element on a page, use $this->layout = 'ajax'; in action, and then assign the rendered view to whatever you need with jQuery. If you don't need to render a view, you can return action results in xml, json or etc. Fanck wrote: > Hi, > > I'm new to jQuery, but I wonder if it is possible to return a result > via controller that jQuery can handle on success? > > I'm trying to POST data to an "add" method, and on success loading the > view with the right $id. Anyone know how to do that? > > thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: jQuery $.ajax() and on success result processing?
Hi > I'm new to jQuery, but I wonder if it is possible to return a result > via controller that jQuery can handle on success? Maybe send the data in JSON ? (see the javascript helper) or PHP built- in json extension... > I'm trying to POST data to an "add" method, and on success loading the > view with the right $id. Anyone know how to do that? I'm not really getting why you need jqery for that ;) greets, kabturek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: jQuery $.ajax() and on success result processing?
I would also like to know. On Oct 9, 6:14 am, Fanck <[EMAIL PROTECTED]> wrote: > Hi, > > I'm new tojQuery, but I wonder if it is possible to return a result > via controller thatjQuerycan handle on success? > > I'm trying to POST data to an "add" method, and on success loading the > view with the right $id. Anyone know how to do that? > > thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
jQuery $.ajax() and on success result processing?
Hi, I'm new to jQuery, but I wonder if it is possible to return a result via controller that jQuery can handle on success? I'm trying to POST data to an "add" method, and on success loading the view with the right $id. Anyone know how to do that? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---