use JQuery to get siblings
<p>I'm trying to get the a tag below to grab the value from the select and paste it into the input.</p>

<pre><code>&lt;td class="ms-formbody" style="width:385px"&gt;
    &lt;input name="ctl00$PlaceHolderMain$dlFields$ctl00$txtSource" type="text" id="ctl00_PlaceHolderMain_dlFields_ctl00_txtSource" class="ms-input" /&gt;
    &lt;select name="ctl00$PlaceHolderMain$dlFields$ctl00$ddlSourceFields" id="ctl00_PlaceHolderMain_dlFields_ctl00_ddlSourceFields" class="ms-input"&gt;
        &lt;option value="Some Field Name 1"&gt;Some Field Name 1&lt;/option&gt;
        &lt;option value="Some Field Name 2"&gt;Some Field Name 2&lt;/option&gt;
        &lt;option value="Some Field Name 3"&gt;Some Field Name 3&lt;/option&gt;
        &lt;option value="Some Field Name 4"&gt;Some Field Name 4&lt;/option&gt;
    &lt;/select&gt;
    &lt;a href="javascript: appendField();"&gt;append&lt;/a&gt;
&lt;/td&gt;
</code></pre>

<p>I can't seem to figure out how to grab siblings. I tried <code>$(this).siblings("input").val()</code> but that errored Webpage error <code>'parentNode.firstChild' is null or not an object</code>.</p>

<p>Tried <code>$(this).prev().prev().val()</code> and that comes back undefined. What's the best way to grab these things?</p>

<p>Thanks,
David</p>
