Hi guys,
I am stuck on this problem.
The ajaxbutton only works for the first time.
view file:
<div id='current-user'>
<?php
$this->renderPartial( '_user', array(
'user' => $user,
));
</div>
_user file:
<ul>
<li><?php echo $user->name; ?></li>
</ul>
<?php
echo CHtml::ajaxLink( 'next', array( 'user/next', 'userid'=>$user->id, 'rand'=>rand(1, 1000) ), array( 'update' => '#current-user',
));
?>
the controllerAction:
public function actionNext($userid)
{
$userid++;
$newUser = User::model()->findByPk($userid);
$this->renderPartial( '_user', array(
'user'=>$newUser,
));
}
Any advice are appreciated.
thanks in advance for your help