Modifica cosi js:
codice:
function process()
{
if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
{
name = encodeURIComponent(document.getElemnetById("myname").value);
xmlHttp.open("GET", "controlloUser.php?name=" +name, true);
xmlHttp.onreadystatechange=handleServerResponse;
xmlHttp.send(null);
}
}
function handleServerResponse()
{
if (xmlHttp.readyState ==4)
{
if (xmlHttp.status ==200)
{
document.getElementById("divMessage").innerHTML= xmlHttp.responseText;
}
else
{
alert("C'è stato un problema nell'accesso del server: " + xmlHttp.statusText);
}
}
}
e html cosi
<div id="divMessage"></div>