One more thing, with ajax you very often need to set the parameter
"update" of link, submit, remote_function etc ... This "update" whould
match the div you will update into the view. Your "rendering" view
would be enclosed into $ajax->div('updatedivname') / $ajax-
>divEnd(...)

On Jun 17, 12:35 am, francky06l <[EMAIL PROTECTED]> wrote:
> for the controller aspect it does not change anything posting data
> using ajax or not. The data posted are accessible in the same way
> ($this->params['data']['Controller'] .. for example).
> The same approach for the rendering. Now everything resides into which
> parts of the view you update with you ajax call (basically doing ajax
> will not affect your controller code). The difference wiht ajax
> resides into the view (thtml ot tcp).
>
> On Jun 16, 8:47 pm, varunkrish <[EMAIL PROTECTED]> wrote:
>
> > <?php echo $ajax->form(array('action'=>$html->url('edit')))?>
>
> > <div id="editAll" style="display:none">Loading..<?php echo 
> > $html->image('spinner.gif',array('alt'=>'Saving..','id'=>'editAllimg'))?>
>
> > </div>
>
> > <?php print $ajax->submit('Load Post', array('url' =>
> > 'editAll/','update'=>'posts','frequency'=>'2','loading'=>"Element.show('editAll');",'loaded'=>"Element.hide('editAll');"));?
>
> > I have a view for add post , but i have text input for edit post . if
> > i type a post id in the edit post and give read.. the form contents
> > should be populated via ajax ?
>
> > my doubt is i know how to save data (add or edit) via ajax by sending
> > data to the controller
>
> > but how to get back data from the controller and populate form
> > contents ?


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

Reply via email to