Hi everyone,

I'm having a problem getting AJAX Pagination to work when adding
additional content to an unordered list.

So, what I want to set up is something along the lines of a Twitter
"more comments" AJAX loading system. When you click "more
comments" (the only pagination control element that will display) it
loads the next X many comments into the UL as LI elements.

So, here is my original code:

<?php
        $paginator->options(array('url'=>$this->passedArgs));
        $paginator->options(array('update' => 'comment-list', 'indicator' =>
'spinner', 'position' => 'bottom'));
?>
<p><?php $session->flash(); ?></p>
<ul id="comment-list">
<?php foreach ($comments as $comment): ?>
        <li><?php echo $comment['Comment']['body']; ?>
                <br />
                On <?php echo $comment['Comment']['created']; ?> by <?php echo
$comment['User']['username']; ?>
        </li>
<?php endforeach; ?>
</ul>
<?php echo $paginator->next('More comments', null, null, array('class'
=> 'disabled')); ?>

However, when you click "more comments" it ALSO loads all the controls
as well as the UL all over again. How can I get it to NOT display the
controls, as well as the UL when loading the next set of comments?

Thanks in advance!

Eric

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en

Reply via email to