I am working in extjs+yii. My server side is in yii framework and client side is in extjs. Now I want to pass extjs\'s submit buttons output to yii action. I am creating multipl
You should post your data to an action in a controller with AJAX for example : site/savequestions
Ext.Ajax.request({
url:"site/savequestions",
method: "POST",
params: {'qid': name, 'aid':value},
success: function(){
console.log("ok");
},
failure: function(response, opts){
console.log("failed");
},
headers: { 'Content-Type': 'application/json' }
});
and then in the controller SiteController
you would have
public function actionSavequestion()
{
$questionId = Yii::app()->request->getParam('qid');
$anserId = Yii::app()->request->getParam('aid');
//... do stuff here
echo json_encode(array('success' => true));
exit()
}