Selecting a value from drop down changes the next drop down list
<p>Hi Guys I am ruby on rails developer and have no idea about javascript or Jquery.</p>

<p>I have a select tag like this :</p>

<pre><code>&lt;select name="form[city]" id="form_city"&gt;
   &lt;option value=""&gt;Select Office&lt;/option&gt;
   &lt;option value="WA - Washington PD"&gt;WA - Washington PD&lt;/option&gt;
   &lt;option value="CA - California PD"&gt;CA - California PD&lt;/option&gt;
   &lt;option value="NY - NewYork PD"&gt;NY - NewYork PD&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>When a user selects for example <strong><em>CA - California PD</em></strong> from the above select tag, the next select tag which will be below it should have a drop down list like this :</p>

<pre><code> &lt;select name="form[cityselected]" id="form_cityselected"&gt;
   &lt;option value="CAF"&gt;CAF&lt;/option&gt;
   &lt;option value="CAL"&gt;CAL&lt;/option&gt;
   &lt;option value="CAU"&gt;CAU&lt;/option&gt;
   &lt;option value="CAS"&gt;CAS&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Thus a Javascript or JQuery function has to be used to collect the option selected in "form[city]" and to append F,L,U,S characters to the first two characters from "form[city]" select tag to the second select tag ->  form[cityselected].</p>

<p>Thanks a lot in advance</p>
