title: How to show value inside input filed on change of drop down value using zend framework 2
body: <p>I am trying to create an onchange event in zend framework 2. suppose if i change option form dropdown list then the related value will be shown on input field .Here my dropdown works fine .but when i am trying to change dropdown list then there is no value shows on my input field.but the data comes.but not display on broweser.So tell me how it is possible.
  Here is My Controller</p>
  
  <pre><code>public function propratingAction()
  {
  
    $projectName = $this-&gt;propinquity()-&gt;projectName();
  
    if($this-&gt;getRequest()-&gt;isPost())
    {
      $project =$this-&gt;getRequest()-&gt;getPost('project'); 
      $projectD = json_decode($project, true);
      //print_r($projectD);
      $propinquityindex=$this-&gt;propinquity()-&gt;getproprating($projectD);
      $propratingHTML=$this-&gt;propratingHTML($propinquityindex);
      print_r($propratingHTML);
    }
  
    $viewModel = new ViewModel();
    $viewModel-&gt;setVariables(array('key' =&gt; 'value'))
              -&gt;setTerminal(true);
  
    return $viewModel;
  }
  
  public function propratingHTML($propinquityindex){
  
    $html='';
    foreach ($propinquityindex as $value) {
      # code...
      $html .='&lt;input type="text" value="'.$value['critics_rating'].'"/&gt;';
    }
    print_r($html);
  
    $viewModel = new ViewModel();
    $viewModel-&gt;setVariables(array("key" =&gt; "value"))
              -&gt;setTerminal(true);
  
  
    return $viewModel;
  }
  </code></pre>
  
  <p>Here is view part</p>
  
  <pre><code>&lt;div style="display:inline-block; margin-left:55px; margin-top:20px;"&gt; 
    &lt;select style="width:12.5em;"  id="project_id" onchange="getsectorindexAjax();" 
            data-placeholder="Project Name" class="selectError2" data-rel="chosen" 
            name="project_id" &gt;
      &lt;option value=""&gt;--select project--&lt;/option&gt;
      &lt;?php if($this-&gt;projectName){
        foreach($this-&gt;projectName as $val){
  
          echo '&lt;option value="'.$val['project_id'].'"&gt;'.$val['Project_name'].'
                    &lt;/option&gt;';
        }
      } ?&gt;
    &lt;/select&gt;
  &lt;/div&gt;
  
  &lt;div class="main" style="display:inline-block; margin-left:10px;margin-top:20px;"&gt;
    CRc Rating
    &lt;input style="width:20em;height:2.7em;"  name="critics_rating" 
           id="critics_rating" type="text" value=""&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>ajax call</p>
  
  <pre><code>function getsectorindexAjax()
  {
  
    require(["dojo/request", "dojo/query","dijit/registry"], function(request, registry) {
      // Locate the JS object.
      var project = dojo.byId("project_id").value;
      //alert(project);
  
      request.post("http://localhost/admin/propinquity/proprating",{
        data : {
          project : JSON.stringify(project)
        }
      }).then(function(text) {
        dojo.byId("critics_rating").innerHTML = text;
        console.log("return data : " + text);           
      });
  
    });
  }
  </code></pre>
  
  <p>So suggest me how can i show value inside input field when my dropdown value is change.</p>