On what grounds do you say readyState==4 is not set?
For all I can see, there are two conditions in your if condition.
Try following and see what's happening.
if (xmlHttp.readyState == 4) {
alert('readyState==4, status==' + xmlHttp.status);
if (xmlHttp.status == 200) {
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
And see what happens.