title: Fill input text forms on other website in iframe
body: <p>I want to autofill textboxes on another website so I'm writing a short script to do this. I'm loading an iframe with a website in it and if this iframe is loaded, it should fill in the input text forms. So I wrote this in <code>autofill.php</code>:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script src="fill.js"&gt;&lt;/script&gt;
  &lt;iframe name="autofillframe" src="https://e-services.blum.com/main/" style="width:100%; height:100%;"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>And this I wrote in <code>fill.js</code>:</p>
  
  <pre><code>$(document).ready(function(e) {
      $('#username').val('username');
      $('#kennwort').val('password');
  });
  </code></pre>
  
  <p>Here is a <a href="http://jsfiddle.net/ZBwCm/1/" rel="nofollow noreferrer">fiddle</a></p>
  
  <p>If I do it with a .php file instead of a website, it works fine.
  Here's a <a href="http://jsfiddle.net/TKyvD/1/" rel="nofollow noreferrer">demo</a> without website</p>
  
  <p>Can someone give me a hint?</p>