I get list from my javascript function.Now i have to pass the list into the controller and access that list in my controller .I don't want to show the passed parameters in my url.How can this be done?
My java script code is:
<script type="text/javascript" language="JavaScript">
function act()
{
var idList = $.fn.yiiGridView.getChecked("marketing-grid", "selectedIds");
if(idList!="")
{
var parIdList = $.param({ 'idList': idList });
window.location.href= '<?php echo Yii::app()->createUrl('marketing/composeMail'); ?>'+ '?'+parIdList;
}
else
{
alert("Please select row to Mail.");
}
}
</script>
My controller code is:
public function actionComposeMail()
{
$model=new Reply;
$model->scenario = 'compose';
$this->render('_compose',array('model'=>$model,//'model1'=>$modelMarket));
}
I have to pass idList in my controller and fetch that list in my function actionComposeMail().