title: AJAX doesn't update value of a text box
body: <p>I want to update a value of a input text box via AJAX. I cannot make it work althouth almost the same AJAX code works fine for 'text' only. The same behavior for ff &amp; chrome.</p>
  
  <p>the only difference is </p>
  
  <pre><code>doesn't work ---&gt; document.getElementById("f1").value=revision;  
  works fine -----&gt; document.getElementById("f2").innerHTML=revision;
  works fine too -&gt; onClick="javascript:document.getElementById('f1').value+='B';" 
  </code></pre>
  
  <p>sample code:</p>
  
  <pre><code>&lt;input type="text" name="f1" id="f1"&gt; 
  &lt;input type="button" value="inline function"  onClick="javascript:document.getElementById('f1').value+='B';"&gt;
  &lt;input type="button" value="AJAX Button" onClick="get_revision2('trunk')"&gt;
  </code></pre>
  
  <p>and the function</p>
  
  <pre><code>    function get_revision2(revision)
      {
        if (window.XMLHttpRequest)
          {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
          }
        else
          {// code for IE6, IE5
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        xmlhttp.onreadystatechange=function()
          {
          document.getElementById("f1").value=revision;
  
          if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
            {
            document.getElementById("f1").value=xmlhttp.responseText;
  
            }
          }
        xmlhttp.open("GET","http://radek:4567/svn_get_revision?code_base="+revision+"&amp;t=" + Math.random(),true);
        xmlhttp.send();
      } 
  </code></pre>
  
  <p>the AJAX code doesn't update the value of the text box. The inline function does.</p>
  
  <p>But for text (not the input text box) even AJAX works fine.</p>
  
  <pre><code>&lt;DIV id="f2"&gt;revision&lt;/div&gt;
  &lt;input type="button" value="inline function" onClick="javascript:document.getElementById('f2').innerHTML+='B';"&gt;
  &lt;input type="button" value="AJAX" onClick="get_revision3('3.0')"&gt;
  </code></pre>
  
  <p>and the function </p>
  
  <pre><code>    function get_revision3(revision)
      {
        if (window.XMLHttpRequest)
          {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
          }
        else
          {// code for IE6, IE5
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        xmlhttp.onreadystatechange=function()
          {
          document.getElementById("f2").innerHTML=revision;
  
          if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
            {
            document.getElementById("f2").innerHTML=xmlhttp.responseText;
  
            }
          }
        xmlhttp.open("GET","http://radek:4567/svn_get_revision?code_base="+revision+"&amp;t=" + Math.random(),true);
        xmlhttp.send();
      }
  </code></pre>