title: How add captcha without php?
body: <p>This my code: the function <code>check()</code> is working, but the function <code>ChangeCaptcha()</code> didn't show letter in input <code>type="randomfield"</code> :</p>
  
  <pre><code>&lt;body onload="ChangeCaptcha()"&gt;
    &lt;input type="text" id="randomfield" disabled&gt;&lt;br&gt;&lt;br&gt;                               
      &lt;input id="CaptchaEnter" size="20" &gt;&lt;br&gt;&lt;br&gt;                         
      &lt;button type="submit" onclick="check()"&gt;Log in&lt;/button&gt;
  
    &lt;script type="text/javascript"&gt;
      function ChangeCaptcha() {
        var chars= "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        var string_lenght = 6;
        var ChangeCaptcha = '';
        for (var i=0; i&lt;string_length; i++) {
          var rnum = Math.floor(Math.random() * chars.length);
          ChangeCaptcha+= chars.substring(rnum, rnum+1);
        }
        document.getElementById('randomfield').value= ChangeCaptcha;
      }
      function check() {
        if (document.getElementById('CaptchaEnter').value == document.getElementById('randomfield').value) {
          window.open('http://www.lolila.hol.es', '_self');
        } else {
          alert('Pleace re-check the captcha!')
        }
      }
    &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>