title: Internet Explorer saving the wrong input as password
body: <p>I'm trying to make a login form that submits an encrypted password to the server, while setting the plaintext it on hidden fields outside the form.</p>
  
  <p>In Chrome/Firefox, it remembers the login/password set in the hidden fields, while in IE, it remembers the encrypted password.</p>
  
  <p>I'd like to know how can I work around this.</p>
  
  <p>here's what I have:</p>
  
  <pre><code>&lt;script&gt;
      function encryptPassword() {
          var txtUsername= document.getElementById("txtUsername");
          var txtPassword= document.getElementById("txtPassword");
  
          document.getElementById('username').value = txtUsername.value;
          document.getElementById('password').value = txtPassword.value;
  
          txtPassword.value = encrypt(md5(txtPassword.value), "&lt;%=pubKey %&gt;");
      }
  &lt;/script&gt;
  
  &lt;div style="visibility: hidden"&gt;
      &lt;input type="text" name="username" id="username" style="width:0;height:0" tabindex="-1" /&gt;
      &lt;input type="password" name="password" id="password" style="width:0;height:0" tabindex="-1" /&gt;
  &lt;/div&gt;
  
  &lt;form id="form1" runat="server"&gt;
      &lt;asp:TextBox ID="txtUsername" autofocus="autofocus" required="required"  runat="server" /&gt;
      &lt;asp:TextBox ID="txtPassword" TextMode="Password" required="required" runat="server" /&gt;
      &lt;asp:Button ID="btnLogin" OnClick="btnOk_Click" OnClientClick="encryptPassword();" runat="server" /&gt;
  &lt;/form&gt;
  </code></pre>