renderPartial, ajaxLink and fancybox problem

Hi there !

I’ve got problem with not working ajaxLink.

how it looks:

I’m using fancybox with ajax request to renderPrtial view which contains CHtml::ajaxLink but link doesn’t work.

Without fancybox and renderPartial request is send normaly by ajaxLink.

controller:




public function actionKick()

 {

   if(isset($_POST['cn'])){

      echo $_POST['cn'];

   }else{

      $this->renderPartial('kicker', array( 'channel'=>$channel, true, true));

 }

View:




<div id="kicker">

</div>

<?php 


echo CHtml::ajaxLink('KOPNIJ', array('/djpanel/sc/kick'), array(

      'type'=>"POST",

      'data'=>array(

             'YII_CSRF_TOKEN' => Yii::app()->request->csrfToken,

             'cn'=>'hello',

              ),

      'update'=>'#kicker',

      )

);

It looks like there is no JS responsible for ajaxLink on renderPartial.

Any ideas ?

Hi,

Please change the

  &#036;this-&gt;renderPartial('kicker', array( 'channel'=&gt;&#036;channel), false, true);

Best Regards,

Ankit Modi

Make sure in controller acces is allowed


public function accessRules()

	{

		return array(

			array('allow',  // allow all users to perform 'index' and 'view' actions

				'actions'=>array('index','Kick'),

				'users'=>array('*'),

			),

}

thats correct make it as false,true, it ll work