Answer the question
In order to leave comments, you need to log in
How to address and correctly accept Ajax requests in Yii within a single action?
Good afternoon, 1. There is a need to accept several Ajax requests
within the current action .
In the case of a single request, everything is clear:
if (Yii::app()->request->isAjaxRequest)
{
$this->renderPartial('_loopAjax', // _loop
[
'_request'=>Yii::app()->request,
'dataProvider'=>$dataProvider,
]);
Yii::app()->end();
}
else
{
$this->render('index',
[
'dataProvider'=>$dataProvider,
]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question