title: onClick copy text field value to drop down field
body: <p>I have been researching how to copy a a text field value into a drop down menu and have only been seeing how to accomplish the opposite. Can somebody help me tweak this code so it will copy the shipping city value (text field) into the billing city (drop down)?</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;Untitled Document&lt;/title&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
      &lt;P&gt;
      &lt;script type="text/javascript"&gt;
      &lt;!--
      function FillBilling(f) {
        if(f.billingtoo.checked == true) {
        f.billingname.value = f.shippingname.value;
        f.billingcity.value = f.shippingcity.value;
        }
      }
      // --&gt;
      &lt;/script&gt;
      &lt;TABLE BORDER=1&gt;&lt;TR&gt;&lt;TD BGCOLOR="eeeeee"&gt;
      &lt;b&gt;Mailing Address&lt;/b&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;form&gt;
      Name:
      &lt;input type="text" name="shippingname"&gt;
      &lt;br&gt;
      City:
      &lt;input type="text" name="shippingcity"&gt;
      &lt;br&gt;
      &lt;input type="checkbox" name="billingtoo" onclick="FillBilling(this.form)"&gt;
      &lt;em&gt;Check this box if Billing Address and Mailing Address are the same.&lt;/em&gt;
      &lt;P&gt;
      &lt;b&gt;Billing Address&lt;/b&gt;
      &lt;br&gt;&lt;br&gt;
      Name:
      &lt;input type="text" name="billingname"&gt;
      &lt;br&gt;
      City:
      &lt;select name="billingcity"&gt;
      &lt;option value="City 1"&gt;City 1&lt;/option&gt;
      &lt;option value="City 2"&gt;City 2&lt;/option&gt;
      &lt;option value="City 3"&gt;City 3&lt;/option&gt;
      &lt;/select&gt;
      &lt;/form&gt;
      &lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>