title: jQuery running the function combobox populate for multiple combobox
body: <p>I have combobox</p>
  
  <pre><code> &lt;select name="search_category[]"  id="search_category_id"&gt;
      &lt;option value="" selected="selected"&gt;&lt;/option&gt;
      &lt;?php
      $query = "SELECT * FROM t_category ORDER BY category_name ASC";
      $results = mysql_query($query);
  
      while ($rows = mysql_fetch_assoc(@$results))
      {?&gt;
          &lt;option value="&lt;?php echo $rows['category_id'];?&gt;"&gt;&lt;?php echo $rows['category_name'];?&gt;&lt;/option&gt;
      &lt;?php
      }?&gt;
  &lt;/select&gt;
  
  &lt;span id="show_sub_categories" align="center"&gt;
  </code></pre>
  
  <p>And here is the JS</p>
  
  <pre><code>jQuery(document).ready(function($){
      $('#loader').hide();
      $('#show_heading').hide();
  $('#search_category_id').change(function(){
      $('#show_sub_categories').fadeOut();
      $('#loader').show();
      $.post("get_chid_categories.php", {
          parent_id: $('#search_category_id').val(),
      }, function(response){
  
          setTimeout("finishAjax('show_sub_categories', '"+escape(response)+"')", 400);
      });
      return false;
  });
  
  function finishAjax(id, response){
   $('#loader').hide();
   $('#show_heading').show();
   $('#'+id).html(unescape(response));
   $('#'+id).fadeIn();
  } 
  
  function alert_id()
  {
  if($('#sub_category_id').val() == '')
  alert('Please select a sub category.');
  else
  alert($('#sub_category_id').val());
  return false;
  }
  </code></pre>
  
  <p>How about if I have multiple combobox with different id?</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;select name="search_category[]"  id="search_category_id1"&gt;
      &lt;option value="" selected="selected"&gt;&lt;/option&gt;
      &lt;?php
      $query = "SELECT * FROM t_category ORDER BY category_name ASC";
      $results = mysql_query($query);
  
      while ($rows = mysql_fetch_assoc(@$results))
      {?&gt;
          &lt;option value="&lt;?php echo $rows['category_id'];?&gt;"&gt;&lt;?php echo $rows['category_name'];?&gt;&lt;/option&gt;
      &lt;?php
      }?&gt;
  &lt;/select&gt;
  
  &lt;select name="search_category[]"  id="search_category_id2"&gt;
      &lt;option value="" selected="selected"&gt;&lt;/option&gt;
      &lt;?php
      $query = "SELECT * FROM t_category ORDER BY category_name ASC";
      $results = mysql_query($query);
  
      while ($rows = mysql_fetch_assoc(@$results))
      {?&gt;
          &lt;option value="&lt;?php echo $rows['category_id'];?&gt;"&gt;&lt;?php echo $rows['category_name'];?&gt;&lt;/option&gt;
      &lt;?php
      }?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want the function running for that 2 combobox. But when tried to run the code, the function only run for first combobox. (The function is populate second combobox based on first combobox).</p>