you shouldn't access the response text until it is 'there',
what you should do is either wait for the request to reach the ready state 4 (best achieved by using an event listener), or set the request to syncronous, by setting the last argument in an 'open' method to false:
xmlHttp.open("GET", url, true);
<any code here will be executed as soon as the open method has been called
xmlHttp.open("GET", url, false);
<any code here will be executed when the request is finished.
is there any reason you want to access the responseText before it has finished?
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
Offline 1,091 posts
since Jul 2006