Here is the solution:
$("#myLink").click(function()
{
$.get('Html->url(array('controller' =>
'posts', 'action' => 'add')); ?>',function(data)
{
$(data).appendTo('#posts');
});
});
On 21 feb., 17:08, Andraž wrote:
> In AJAX helper is option position, that append returned data to this
> element.:
>
>
>
> link(
> 'View Post',
> array( 'controller' => 'posts', 'action' => 'view', 1),
> array( 'update' => 'post', 'position' => 'top' )
> );
> ?>
> Is something similar in Js helper? I'm using CakePHP 1.3 and jQuery.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
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