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
zaccaria
(Matteo Falsitta)
2
Is not understandable what do you want to do. You should call wich renderPartial? Where?
bettor
(Live Webscore)
3
setup a new action that renders the renderPartial only and point your ajaxsubmit button to that action
viter
(Chekhiv)
4
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(); ?
viter
(Chekhiv)
6
To stop executing the rest of the code in your action.