title: Javascript change textbox value within iFrame
body: <p>I'm trying to change the value of a text box within iframe.
   I have tried using GetElementById in every way i could find and nothing seems to work.</p>
  
  <p>I found a alternative to iframe by using the Object data tag but it has the same problem.</p>
  
  <p>My code more or less, I changed it a bit for presentation:</p>
  
  <pre><code> &lt;html&gt;
   &lt;head&gt;
  
   &lt;title&gt;None&lt;/title&gt;
  
   &lt;/head&gt;
   &lt;body&gt;
  
   &lt;script type="text/javascript"&gt;
  
   function changeValue() {
   var textBox = document.getElementById('userName');
   textBox = "hello!";
  
   }
  
   &lt;/script&gt;
  
   &lt;iframe id="myFrame" src="http://www.website.com"&gt;&lt;/iframe&gt; 
  
   &lt;input type="button" onclick="changeValue()" value="Submit"&gt;
  
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>