JQuery add hidden element to form programmatically
<p>This is really getting to me now.I have a form that loads when the page loads.In my jquery
'ready' function I append a hidden to that form like so : </p>

<pre><code>$("&lt;input id='thehidden' type='hidden' name='thehidden' value='hiddenval'&gt;").appendTo("#MenuForm")
</code></pre>

<p>When I check the form content with firebug i can see the element is added.</p>

<pre><code>["$(\"#MenuForm\").children()"] is [div, input#thehidden hiddenval]
</code></pre>

<p>All good so far.When I submit this form and try and read the elemet again,i can't get the value of the new hidden val I added.</p>

<pre><code>alert($('#thehidden').val())
</code></pre>

<p>is undefined</p>

<p>Any help would be appreciated</p>
