title: Inserting username and password at website using javascript in Chrome
body: <p>I was trying to make script which will auto-login me to website (<a href="http://gamers.ba/" rel="nofollow">http://gamers.ba/</a>), but I can't get it to insert my username and password inside form. I tried this code:</p>
  
  <pre><code>javascript:document.forms['cssforms'].elements[username].value = MyUsername;
  </code></pre>
  
  <p>but nothing happens actually...</p>
  
  <p>Also I tried this code:</p>
  
  <pre><code>javascript:document.getElementById('username').value = 'MyUsername';
  </code></pre>
  
  <p>but then I just get new blank page with "MyUsername" text at left upper corner...</p>
  
  <p>This is part of code when I inspect that element in my Chrome:</p>
  
  <pre><code>    &lt;form method="post" action="" class="cssform"&gt;
          &lt;div class="control-group"&gt;
              &lt;label for="username"&gt;Username&lt;/label&gt;
              &lt;input style="width:355px;" type="text" name="username" id="username" value=""&gt;
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance!</p>