ajaxSubmitButton

hi all,

how can I call renderPartial in ajaxSubmitButton using ?

this is my code at view :




<?php echo CHtml::ajaxSubmitButton($model->isNewRecord ? 'Create' : 'Save',

											//CHtml::normalizeUrl(array('experience/create')),

											CController::createUrl('/experience/create'),

											array('update'=>'#form','type'=>'POST'),

); ?>



it calls all the create page, while I want only the renderPartial _form in the create page.

anyone can help ?

thanks

Is not understandable what do you want to do. You should call wich renderPartial? Where?

setup a new action that renders the renderPartial only and point your ajaxsubmit button to that action

You can use this code in your create page action




if(isset($_POST['ajax']))

{

	your code here;

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

}



Yii::app()->end() will stop executing the rest of the code in your action.

thanks viter, why there must a Yii::app()->end(); ?

To stop executing the rest of the code in your action.