Hi team, I have created select functionality using Select2 option. Now, i need to get the selected value without submit the form. I have tried clientEvents change event but it was not working. ` <?php

           Select2::create(array(
              "name"=>"singleSelect2",
              "id"=>"nrmstatus",
              "dataStore"=>$this->dataStore("doc_status"),
              "defaultOption"=>array(" Select"=>""),
             //  "dataBind"=>"doc_status_name",
              "dataBind"=>array("text"=>"doc_status_name","value"=>"doc_status_id"),
              "attributes"=>array(
              "class"=>"form-control",
              "clientEvents"=>array(
              "change"=>"function(e){
                 window.alert($('#nrmstatus').val());
              }",
              )
            )
            ));
            ?>
Can you please advice how to get selected value and insert in to query . Thankyou !!