hi cricket
thanks for your help,... thanks for your try,...
the problem is solved,...
here is what I did,...
<?php echo $this->Paginator->options(array('update' => '#comments', 'url'=>
array('controller' => 'BlogComments', 'action' => 'ajax_show/' .
$blog['Blog']['id']) )); ?>
an at the bottom of the page:
<?php echo $this->Js->writeBuffer(); ?>
On Monday, November 19, 2012 12:04:24 PM UTC-8, cricket wrote:
>
> I don't use Cake's AjaxHelper so can't say much about that. I would
> log $this->params to see what it has. Also, check $this->request.
>
> On Mon, Nov 19, 2012 at 2:54 PM, Chris <[email protected] <javascript:>>
> wrote:
> > hi cricket,... thank you for reply,...
> >
> > I think the problem is with:
> > $id = array_key_exists('blog_id', $this->params['pass']) ?
> > $this->params['pass']['blog_id'] : null;
> > it's not passing it $this->params['pass'] ,...
> >
> > this is how I call function,...
> > <?php echo $ajax->remoteFunction(array('url' => array('controller' =>
> > 'blog_comments', 'action' =>
> 'ajax_show/','blog_id:'.$blog['Blog']['id']),
> > 'update' => 'comments')); ?>
> >
> > and I can't figure out what to do,...
> >
> >
> > On Monday, November 19, 2012 10:57:51 AM UTC-8, cricket wrote:
> >>
> >> It would help if you mentioned what the problem was. Also, things
> >> you've tried, debugging info, etc.
> >>
> >> On Mon, Nov 19, 2012 at 3:10 AM, Chris <[email protected]> wrote:
> >> >
> >> > hi guys,... I can't retrieve blog comments on cake 1.3 when it used
> to
> >> > work
> >> > on cake 1.2
> >> > can anyone help please,...
> >> >
> >> > I call comments ajax page with remoteFunction,... using jQuery:
> >> >
> >> > <script type="text/javascript">
> >> > <?php echo $ajax->remoteFunction(array('url' => array('controller' =>
> >> > 'blog_comments', 'action' =>
> >> > 'ajax_show/','blog_id:'.$blog['Blog']['id']),
> >> > 'update' => 'comments')); ?>
> >> > </script>
> >> >
> >> > which is similar to Prototype call (I used to have on cake 1.2,...
> and
> >> > it's
> >> > working on 1.2):
> >> >
> >> > <script>
> >> > new Ajax.Updater("comments", "<?php echo
> >> > $html->url('/blog_comments/ajax_show/blog_id:' . $blog['Blog']['id'])
> >> > ?>", {
> >> > evalScripts:true, onComplete:function() {
> $("comments_loading").hide() }
> >> > });
> >> > </script>
> >> >
> >> >
> >> > And this is ajax_show function in blog_comments controller:
> >> >
> >> > function ajax_show()
> >> > {
> >> > $this->layout = 'ajax';
> >> >
> >> > $id = array_key_exists('blog_id', $this->params['pass']) ?
> >> > $this->params['pass']['blog_id'] : null;
> >> >
> >> > if(!($blog = $this->Blog->findById($id)))
> >> > {
> >> > die();
> >> > }
> >> > else
> >> > {
> >> >
> >> > $this->set('url_options', array('blog_id' => $id));
> >> > $this->set('blog', $blog);
> >> > $this->set('blog_comments', $this->paginate('BlogComment',
> >> > array('BlogComment.blog_id' => $blog['Blog']['id'] )));
> >> > $this->set('offset',
> >> > ($this->params['paging']['BlogComment']['page'] -
> >> > 1) * $this->paginate['limit'] + 1);
> >> >
> >> > debug($blog);
> >> > debug($blog_comments);
> >> >
> >> > }
> >> > }
> >> >
> >> > thanks in advance,
> >> > chris
> >> >
> >> > --
> >> > Like Us on FaceBook https://www.facebook.com/CakePHP
> >> > Find us on Twitter http://twitter.com/CakePHP
> >> >
> >> > ---
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "CakePHP" group.
> >> > To post to this group, send email to [email protected].
> >> > To unsubscribe from this group, send email to
> >> > [email protected].
> >> > Visit this group at http://groups.google.com/group/cake-php?hl=en.
> >> >
> >> >
> >
> > --
> > Like Us on FaceBook https://www.facebook.com/CakePHP
> > Find us on Twitter http://twitter.com/CakePHP
> >
> > ---
> > You received this message because you are subscribed to the Google
> Groups
> > "CakePHP" group.
> > To post to this group, send email to [email protected]<javascript:>.
>
> > To unsubscribe from this group, send email to
> > [email protected] <javascript:>.
> > Visit this group at http://groups.google.com/group/cake-php?hl=en.
> >
> >
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.