title: How do I set the value of an input field inside an iframe with jQuery?
body: <p>I have a form inside an iframe that needs to be manipulated from the main frame.</p>
  
  <p>The iframe is viewed in a pop-over when a button is clicked in the main frame. It then contains a upload form with a hidden field called dir.</p>
  
  <p>I want to set the hidden field before showing the form. I tried:</p>
  
  <pre><code>$('#upload_iframe').contents().find('#dir').val(dir);
  </code></pre>
  
  <p>... which runs. And the new value can be printed with alert() in the main frame. However, the iframe doesn't change it's value. Can you help me figure out why?</p>
  
  <p>Thank you!</p>