title: HTML, Javascript web page auto login
body: <p>I'm trying to load an external page and run auto login script. This is what I got so far, but it's not working =( Any help be appreciated!</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  javascript:(function(){
    window.open ("https://external page address","_self");
    document.getElementById("username").value="my username";
    document.getElementById("password").value="my password";
    document.getElementById("loginbutton").click();
  })();
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;title&gt;Login Page&lt;/title&gt;
  
  &lt;body onload="function()"&gt;
  
  
  
  &lt;/body&gt;
  </code></pre>
  
  <p></p>