title: How to set value to select box and trigger change event
body: <p>I need one help. I need to set value to select box dynamically and trigger the change event. I am explaining my code below.</p>
  
  <pre><code>&lt;select class="chosen-select text-left" style="width:100%;"  onchange="setCountry();" id="conid"&gt;
  &lt;option value="" selected&gt;Select Country&lt;/option&gt;
  &lt;?php
      foreach ($country as $v) {
  ?&gt;
  &lt;option value="&lt;?php echo $v['country_id']; ?&gt;"&gt;&lt;?php echo $v['country_name']; ?&gt;&lt;/option&gt;
  &lt;?php
      }
  ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Here I am fetching the value like below.</p>
  
  <pre><code>var conval=document.getElementById('conid');
  selectVal=conval.options[conval.selectedIndex].text;
  </code></pre>
  
  <p>Suppose I have one country name <code>India</code> and I need to set dynamically to that select box and at the same time the change event(<code>i.e-setCountry</code>) will trigger.Please help me.</p>