By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Capture ReadyState 3

P: 3
I m trying to get the responseText for readystate= 3 in internet explorer but it gives me error
"The data necessary to complete this operation is not yet complete" .
I want to get the the string value sent from the server and to process that string futher. code on the Oneventchange handler is

xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
if (xmlHttp.readystate==3)
{
alert(xmlHttp.responseText);
}
Jun 22 '07 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
Firstly, you should code for every browser, not just IE.

Put your code (not the first line) into an onreadystatechange:
Expand|Select|Wrap|Line Numbers
  1. xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState==3)...
One other thing, it's ready when the ready state is 4, not 3. See how it is done and what the states mean here.
Jun 22 '07 #2

P: 3
yes i have put it in onreadystatechange event handler but i have to updated data from server continously so dat i need readystate 3
Jun 23 '07 #3

acoder
Expert Mod 15k+
P: 16,027
But on readyState 3, it's still in process. What you can do is show the progress if you want.
Jun 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.