title: jQuery: using select onchange event to fill sibling text field?
body: <pre><code>&lt;select onchange="$(self).siblings('input[type=text]').val( $(self).val() ); $(self).siblings('input[type=checkbox]').attr('checked','checked')"&gt;
  </code></pre>
  
  <p>that does not work</p>
  
  <p>before the select box, there are these inputs (examples):</p>
  
  <pre><code>&lt;input type="text" value="" id="product[14][value]" name="product[14][value]"&gt;
  &lt;input type="checkbox" value="1" id="product[14][enabled]" name="product[14][enabled]"&gt;
  </code></pre>
  
  <p>after debugging in firebug, i found that it is in fact finding the siblings, and the part that is failing is filling the text field with the select's value:</p>
  
  <pre><code>.val( $(self).val() ); 
  </code></pre>
  
  <p>what's wrong with it?
  thanks!</p>