Select box option to change input element ID
<p>Following on from a question I posted yesterday. Found here: <a href="http://stackoverflow.com/questions/9372382/append-different-div-id-to-option-selects">Append different div id to option selects?</a></p>

<p>This is working Great ..</p>

<p>I just need to add one extra tweak, and I pretty much have it working how I need it.</p>

<p>Synopsis.</p>

<p>User picks option from select menu.
That option, triggers a div ID.</p>

<p>I also need it to change input ID aswell .</p>

<p>Is this dooable ?</p>

<p>Typical jQuery I have is:</p>

<pre><code>$(document).ready(function() {
$("#selectanimage").change(function(){
$("#masterPreview &gt; div").hide();
$("#" + $(this).val()).show();
});
});
</code></pre>

<p>The  select is :</p>

<pre><code>&lt;select id="selectanimage" name="selectanimage" style="width: 474px;" class="required"&gt;
&lt;option value="null"&gt;--- Select your Image ... ---&lt;/option&gt;
&lt;option value="oneblk"&gt;125px x 125px Black Background&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>The DIV this triggers is:</p>

<pre><code>&lt;div id="masterPreview"&gt;
&lt;div id="oneblk"&gt;Apple Div&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>However I also have an input element whos ID I want to simultaneously change based on select option chosen.</p>

<p>Its just a regular input element.</p>

<p>Any suggestions please ( incidentally the inputs ID ) will vary dependant on option select and it must be a different ID from that within the option select ( for css reasons )</p>

<p>EDIT----------------------------------</p>

<p>Fiddle here: >> <a href="http://jsfiddle.net/ozzy/d5s9T/" rel="nofollow">http://jsfiddle.net/ozzy/d5s9T/</a></p>

<p>Basically ( only coded for the first select ) but you should get the idea.</p>

<p>If they select the first option, I need the input id to become oneblkinput )</p>

<p>If they chose second select option I need input id to become onewhtinput</p>

<p>Etc </p>
