title: JQuery and hidden fields
body: <p>I need to create a hidden field on my page, store some value in it and read that value later.
  If i create a regular text input and read its value using jquery, i get the correct value. But if i create a hidden input field,populate it with some text and read its value using jquery i get null.</p>
  
  <p><strong>example:</strong></p>
  
  <p>Suppose the following input text box contains the value "Foo".</p>
  
  <pre><code>&lt;input type="text" id="inputfield"&gt; &lt;/input&gt;
  </code></pre>
  
  <p>Now, if i do <code>$("#inputfield").val()</code>, i correctly get "Foo"</p>
  
  <p>But, if i change the type to "hidden", and set the value of field, using <code>$("#inputfield").val("Foo")</code> then try to read the value using <code>$("#inputfield").val()</code>, it returns "".</p>
  
  <p>Can someone please tell me why this happens and any way to fix this ?</p>
  
  <p>Thank You.</p>