how to insert the text of a select box into a hidden field
<p>I need to insert the text of a selected text box into a hidden field, I'm not quite sure how to achieve that,</p>

<p>any help would be appriciated.</p>

<pre><code>&lt;form id="select"&gt;
                &lt;select name="select" id="select"&gt;
                  &lt;option&gt;NY, 10&amp;quot;, £6.65&lt;/option&gt;
                  &lt;option&gt;NY, 12&amp;quot;, £8.95&lt;/option&gt;
                  &lt;option&gt;NY, 16&amp;quot;, £11.95&lt;/option&gt;
                  &lt;option&gt;Chicago, 7&amp;quot;, £3.45&lt;/option&gt;
                  &lt;option&gt;Chicago, 10&amp;quot;, £6.65&lt;/option&gt;
                  &lt;option&gt;Chicago, 12&amp;quot;, £8.95&lt;/option&gt;
                  &lt;option&gt;Chicago, 16&amp;quot;, £11.95&lt;/option&gt;
                  &lt;option&gt;Chicago, Beast 24&amp;quot; x 18&amp;quot;, £19.95&lt;/option&gt;
                 &lt;/select&gt;
         &lt;/form&gt;


&lt;form id="add-pizza"&gt;
&lt;input type="hidden" name="my-item-name" value="" /&gt;
&lt;/form&gt;
</code></pre>

<p>I need to insert the text of the text box into the hidden field value="".</p>

<pre><code>   $(function()
    {
    var str="";
    $("#select option:selected").each(function() {
        str += $this.text() + "";
});

  });
</code></pre>

<p>thanks</p>
