How to make Ajax Request

Hi everyone

How to make ajax request…



  echo Html::tag('h4', 'Select Bidding');


  echo Html::beginForm('getbidding', 'POST', [

  'onsubmit'=>" $.ajax({

            url: form.attr('action'),   

            type: 'post',

            data: form.serialize(),





  echo Html::dropDownList("bidding_group", Yii::$app->request->post()['chit_group'],

  $listData, ['prompt'=>'Select Chit Group', 'style'=>'width:20%;', 'required'=>'required']);


  echo "<br>";



    <div class="form-group">

         <?= Html::submitButton('Submit', ['class' => 'btn btn-primary']) ?>



 echo  Html::endForm();



public function actionGetBidding()


$orgid= Yii::$app->request->post()['bidding_group'];

$dataProvider = new ActiveDataProvider([

                    'query' => Bidding::find()->where(['organization_id'=>$orgid]),


return $this->render('bidding', [

                  'dataProvider' => $dataProvider]);


I want controller to return response to same page and response need to be display as GridView…

Any suggestions how to implement it…

Thanks in advance ::) ::)


see this tut may be help you.

Thanks a lot… ::) ::)