title: html select tag: on select get value from another select tag
body: <p>I have two Select tags : the first one is dynamically populated with a php script (scans my non-empty folders) and give me the country codes as below:  </p>
  
  <pre><code>         &lt;select name="countries" id="countries"&gt; 
           &lt;option&gt;fr&lt;/option&gt;
           &lt;option&gt;gr&lt;/option&gt;
           &lt;option&gt;it&lt;/option&gt;
           &lt;option&gt;gr&lt;/option&gt;
           &lt;option&gt;pl&lt;/option&gt;
           &lt;option&gt;gb&lt;/option&gt;
           &lt;option&gt;es&lt;/option&gt;
           &lt;option&gt;pt&lt;/option&gt;
                    ... 
           (dynamically populated from a php script)
      &lt;/select&gt;
  </code></pre>
  
  <p>and the second SELECT is a full list  of countrie with their codes already populated:</p>
  
  <pre><code>    &lt;select name="ctCodes" id="ctCodes"&gt;
      &lt;option&gt;--select--&lt;/option&gt;
      &lt;option value="fr"&gt;France&lt;/option&gt;
      &lt;option value="nl"&gt;Netherlands&lt;/option&gt;
      &lt;option value="bl"&gt;Belgium&lt;/option&gt;
      &lt;option value="rs"&gt;Russia&lt;/option&gt;
                     ... 
        (full ready list with all countries and code as value)
      &lt;/select&gt;
  </code></pre>
  
  <p>I don't want that my visitor choose from the first SELECT because it is just codes (fr, de, ..) but I want him to choose from a more comprehensive list with full name country (France, Germany..) where the options values will redirect him to the selected country : Ex he selects Germany, my function will take him : location.href = "xxx.php#" + element.value;) in this case 'de'.</p>
  
  <p>How can I realize this: Create a Third SELECT tag which OPTIONS are added from the full dropdown list according to the first one ? ..is there a solution to just filter the fullname list in the 2nd SELECT tAG to keep only Options which are loaded in the first one ?  ...I know that's a nano second job for sql or ms-access !.. but is it possible to do it with html and javascript?
  I am gratefull for all answers.</p>