title: Display the selected value of a Drop down list in a text field (javascript) in a post wordpress
body: <p>I am trying to display the selected value from the drop down list in a text field in a wordpress post. But the code its not fetching the values.</p>
  
  <pre><code>&lt;select name="cmbitems" id="cmbitems"&gt;&lt;style type="text/javascript"&gt;
  var select = document.getElementById('cmbitems');
  var input = document.getElementById('txtprice');
  select.onchange = function() {
  input.value = select.value;
  }
  &lt;/script&gt;
  &lt;option value="" selected="selected"&gt;Select Country&lt;/option&gt;
  &lt;option value="£0.0"&gt;Ireland&lt;/option&gt;
  &lt;option value="£2.50"&gt;United States&lt;/option&gt;
  &lt;option value="£2.50"&gt;United Kingdom&lt;/option&gt;
  &lt;option value="£2.50"&gt;Afghanistan&lt;/option&gt;
  &lt;option value="£2.50"&gt;Albania&lt;/option&gt;
  &lt;option value="£2.50"&gt;Algeria&lt;/option&gt;
  &lt;option value="£2.50"&gt;American Samoa&lt;/option&gt;
  &lt;option value="£2.50"&gt;Andorra&lt;/option&gt;
  </code></pre>
  
  <p>
      Postage Fee:</p>
  
  <pre><code>&lt;input type="text" name="txtprice" id="txtprice" onClick="checkPrice()"&gt;
  </code></pre>