title: change selected combobox value in javascript
body: <p>i have 2 combobox , if i select value "foto" , the other combobox will show #foto_cat. when i choose "panen" the foto_cat is hidden and else. if not choose, the foto_cat is hidden too.</p>
  
  <p>this is my script </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  
  $('#combo1').change(function(){
         x=$(this).val();
          if(x=='foto'){
          $('#foto_cat').show();
           }
          else if(x=='panen'){
          $('#foto_cat').hide();
          }
          else{
          $('#foto_cat').hide();
          $('#foto_cat').val('0');
          }
        });
    });
  
    &lt;/script&gt;
  
        &lt;p class="blok"&gt;
      &lt;label for="id"&gt;Kategori Report :&lt;/label&gt;
      &lt;?php
              $options = array(
                '0'  =&gt; '--------',
                'panen'  =&gt; 'Panen',
                'foto'  =&gt; 'Foto',
              );
              echo form_dropdown('combo[combo1]',$options,'0','id="combo1"');         
          ?&gt;
     &lt;/p&gt;
  &lt;p class="blok" id="foto_cat" style="display:none"&gt;
  &lt;label for="id"&gt;Kategori Foto :&lt;/label&gt;
      &lt;?php
              $options = array(
                '0'  =&gt; '--------',
                'pupuk'  =&gt; 'Pemupukan',
                'pelihara'  =&gt; 'Pemeliharaan',
              );
      echo form_dropdown('combo[combo5]',$options,'0','id="combo5"');         
          ?&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>the question is . how to change combobox id=combo5 when i choose in combo1 value = "0" the combobox combo5 will select same value = 0 and hide other option, when i choose value "foto" the combobox is show and the option will show too?.</p>
  
  <p>sory for my bad english.</p>