Howto Make Ajaxlink Pass A Linkbutton?

Hello

With ajaxlink i’m picking which item i want to proceed with…

I then want the controller to update my div id with a linkbutton.

My code:


echo CHtml::ajaxLink(

  CHtml::image($data->imageUrl, $data->step1Name, array("style"=>"width: 80px; height: 70px; border: 1px;")),

  Yii::app()->createUrl( '/fs/ajaxRequest' ),

  array(

    'type'=>'POST',

    'update'=>'#proceed_button',

    'data'=>array(

	'step'=>'step1',

	'id'=>$data->step1Id

    )

  ),

  array(

    'href' => Yii::app()->createUrl( '/fs/ajaxRequest' ),

    'class' => 'link',

    'id'=>uniqid(),

    'title'=>$data->step1Name,

  )

);

<div id="proceed_button"><?php echo CHtml::submitButton('Proceed', array('class'=>'btn','disabled'=>'disabled')); ?></div>



My controller then looks like this:


public function actionAjaxRequest() {

  if($_POST['step'] == 'step1'){

    Yii::app()->session['step1'] = $_POST['id'];

    echo CHtml::linkButton('Proceed', array('submit'=>array('goto'),'params'=>array('redirect'=>'step2','id'=>$_POST['id']),'class'=>'btn link8'));

  }

  Yii::app()->end();

}

This way, it will only echo the linkbutton, but not the actual jquery where the actual link is posted…

How can i accomplish this?

(i dont want to use a normal "link" if i can be without…

Thanks

// Casper

bump

I guess you should move your [font=“Courier New”]echo …[/font] into a partial view, which you’ll have to render using [font=“Courier New”]$processOutput = true[/font]

See here:

http://www.yiiframework.com/doc/api/1.1/CController#renderPartial-detail