Hi every one !
i need to know what’s the best way to create like button in yii framework ?
which one is the best ?
extension? or ajaxbutton ?
please guide!!!!!
Hi every one !
i need to know what’s the best way to create like button in yii framework ?
which one is the best ?
extension? or ajaxbutton ?
please guide!!!!!
Ajax button should do the job.
Please check this:
http://www.yiiframework.com/doc/api/1.1/CHtml#ajaxButton-detail
thanks for your reply
would you give me example i do some ajax but doesn’t work!
like the simplest one (the code below) but doesn’t work!
this is my controller:
public function actionUpdateAjax(){
$data = array();
$data["myValue"] = "Content updated in AJAX";
$this->renderPartial('_test', $data, false, true);
}
public function actionRoot(){
$data = array();
$data["myValue"] = "Content loaded";
$this->render('root', $data);
}
and my view:_test.php that renderpartial
<div class="main">
<?php echo $myValue ?>
</div>
and the another one:
<div class="main">
<div id="data">
<?php $this->renderPartial('_test', array('myValue'=>$myValue)); ?>
</div>
<?php echo CHtml::ajaxButton ("Update data",
CController::createUrl('site/UpdateAjax'),
array('update' => '#data'));
?>
</div>
where’s my problem?
no one knows?
please give me such a example but i can’t get result
if someone have something related please help
i googling alot but i can’t find the solution