title: name attribute inhibits onclick function
body: <p>The code below works fine, it changes the type of password to reveal the input as text.
  The prolem appears when adding a name attribut to &quot;password&quot; in order to retrieve data from $POST in php. I thought there might be a way to get the data on serverside without a &quot;name&quot;, but my reasearch showed that without a &quot;name&quot; attribute no data can be retrieved.</p>
  <p>Question: How to bring in the name attribute and keep my functionality?</p>
  <pre><code>            &lt;div&gt;
                  &lt;label for=&quot;password&quot;&gt;Passwort (8 min. pls. )&lt;/label&gt;
                  &lt;input type=&quot;password&quot; id=&quot;password&quot; minlenght=&quot;8&quot; required&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label for=&quot;anzeigen&quot;&gt;Passwort anzeigen&lt;/label&gt;
                  &lt;input type=&quot;checkbox&quot; onclick=&quot;anzeigen()&quot; &gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;input type=&quot;submit&quot; id=&quot;mitmachen&quot; value=&quot;mitmachen&quot;&gt;
              &lt;/div&gt;
          &lt;/form&gt;
          &lt;script&gt;
              function anzeigen() {
                  var x = document.getElementById(&quot;password&quot;);
                  if (x.type === &quot;password&quot;) {
                      x.type = &quot;text&quot;;
                  }else {
                      x.type = &quot;password&quot;;
                  }
              }
          &lt;/script&gt;
  </code></pre>