Dear all,
I have the following buttons in the same page:
echo CHtml::link('<i class="icon-flag"></i> Report abuse',"#", array('submit'=>array('report', 'id'=>$model->id),'confirm' => 'Are you sure to report this post as an inappropriate post?','class'=>'btn btn-mini btn-action'));
echo CHtml::ajaxLink("<i class='icon-star icon-white'></i>Like", $this->createUrl('post/voteup', array('id' => $post->id)), array('update'=>'#ajaxgame'.$post->id), array('class'=>'btn btn-mini btn-success'));
Here is the update:
<?php
echo CHtml::ajaxLink('<i class="icon-remove icon-white"></i> Liked', 'http://123.com/posts/votedown/'.$id, array('update'=>'#ajaxgame'.$id), array('class'=>'btn btn-mini btn-success active'));
Yii::app()->getClientScript()->registerCoreScript('yii');
?>
Right now, each time I click like, and it updates to the code right above. And If i click again, it not updates to the code votedown…instead…it triggers the report action…
So weird…
Any ideas?