Can set value to hidden field on change set value to hidden field?
<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
        &lt;head&gt;
                &lt;title&gt; &lt;/title&gt;
                &lt;style type="text/css"&gt;
                &lt;/style&gt;
                &lt;script type="text/javascript"&gt;
                function setPrice(selObj){
                        document.forms['f1'].price.value = selObj.options[selObj.options.selectedIndex].value;
                }
                &lt;/script&gt;
        &lt;/head&gt;
        &lt;body&gt;
                &lt;form name='f1'&gt;
                        &lt;select name="category" onchange='javascript: setPrice(this);'&gt;
                                &lt;option value=''&gt;Select an option&lt;/option&gt;
                                &lt;option value="41"&gt;Men&lt;/option&gt;
                                &lt;option value="39"&gt;Women&lt;/option&gt;
                                &lt;option value="20"&gt;Under 18's&lt;/option&gt;
                        &lt;/select&gt;
                &lt;input name="price" type="hidden" value="" /&gt;
&lt;/form&gt;
        &lt;/body&gt;
&lt;/html 
</code></pre>

<p>Are there any problems with the code,because I did not see the update value in  hidden field ? </p>
