Servlet + Ajax + JSP

Hei, I'm trying to fill a textfield declared in a jsp file with some text after calling a servlet using Ajax. The xmlhttp.responseText contains the text returned by the servlet, but the input with the message id is not filled with that text and I don't know why. Any suggestions? The code used is below.

function ajaxFunction() {
  if(xmlhttp) { 
   var txtname = document.getElementById("txtname");
    xmlhttp.open("POST","getname",true); //getname will be the servlet name
    xmlhttp.onreadystatechange  = handleServerResponse;
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlhttp.send("txtname=" + txtname.value); //Posting txtname to Servlet
  }
}

function handleServerResponse() {
    //alert(xmlhttp.readyState);//ok    
   if (xmlhttp.readyState == 4) {
       alert(xmlhttp.status);
     if(xmlhttp.status == 200) {
         alert(xmlhttp.responseText); // this is ok
         document.getElementById("message").innerHTML=xmlhttp.responseText; // doesn't work
       //document.myForm.message.innerHTML=xmlhttp.responseText; //neither
     }
     else {
        alert("Error during AJAX call. Please try again");
     }
   }
}
</script>

<body>
  <form name="myForm" method="POST" action="/ajjax/getname">
    <table>
      <tr>
        <td>Enter Name</td>
        <td><input type="text" name="txtname" id="txtname" /></td>
      </tr>
      <tr>
        <td colspan="2"><input type="button" value="Submit" onclick="ajaxFunction();" /></td>
      </tr>
    </table>
    <input type="text" name="message" id="message" />  
  </form>
</body>
</head> </html>

Try this:

document.getElementById("message").value = xmlhttp.responseText;

<input/> fields have value attribute, innerHtml won't work (at least as expected).