title: Reusing the partials multiple times on one page in Ruby on Rails
body: <p>I have a partial that renders a select box using the following method:</p>
  
  <pre><code>&lt;%= collection_select 'type', 'id', @types, "id", "name", 
    {:prompt =&gt; true}, 
    {:onchange =&gt; 
                remote_function(
                :loading =&gt; "Form.Element.disable('go_button')",
                :url =&gt; '/sfc/criteria/services', 
                :with =&gt; "'type_id=' + encodeURIComponent(value) + '&amp;use_wizard=#{use_wizard}'"),
      :class =&gt; "hosp_select_buttons"
  } %&gt;
  </code></pre>
  
  <p>This partial gets used 2 times on every page, but at one point I need to get the value of the first select box. Using:</p>
  
  <pre><code>$('type_id')
  </code></pre>
  
  <p>returns the second select box. Is there a way to find the first one easily? Should I fix this using javascript or by redoing my partial?</p>
  
  <p>Note: the dropdowns do get rendered in separate forms.</p>