jQuery Select Failed To Change Input Value : <p>I have this jquery inside PHP code :</p>

<pre><code>echo '&lt;select id="state" name="state" onchange="document.getElementById(\'state_text_content\').value=this.options[this.selectedIndex].text&gt;
    '.$list_state.'
&lt;/select&gt;
&lt;input type="hidden" name="state_text" id="state_text_content" value="" /&gt;';
</code></pre>

<p>why onchange function doesn't update <code>#state_text_content</code> value? thank you.</p>
