Here is the solution:

<script>
        $("#myLink").click(function()
        {
            $.get('<?php echo $this->Html->url(array('controller' =>
'posts', 'action' => 'add')); ?>',function(data)
            {
                $(data).appendTo('#posts');
            });
        });
    </script>

On 21 feb., 17:08, Andraž <andraz.prin...@gmail.com> wrote:
> In AJAX helper is option position, that append returned data to this
> element.:
>
> <div id="post">
> </div>
> <?php echo $ajax->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

Reply via email to