Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSXML2.XMLHttp.5.0 and readyState problem

Status
Not open for further replies.

Zig999

Programmer
Nov 8, 2005
20
BR
Hi,

I have a simple AJAX class that works perfect if the httpRequest object is created using MSXML2.XMLHTTP.
I have a selector the searches for the newest MSXML object instaled. Then, when I run my script into a Windows XP machine, it creates the httpRequest object using MSXML2.XMLHttp.5.0 and here comes the problem.
This is part of my onreadystatechange function. When using MSXML2.XMLHTTP everything works fine and the first readyState value is, obviously, 1. When running in WinXp, for my surprise, readyState's first value starts at 2 and not 1. Anyone has ever had some error like this?
Thanks
Code:
switch (this.xmlHttp.readyState) {
case 1:
   this.onLoading();				
   break;
case 2:				
   this.onLoaded();
   break;
case 3:				
   this.onInteractive();
   break;
case 4:				
   if (this.xmlHttp.status == 200) {
      this.onComplete();
   } else {
      alert("error");
   }
   break;
}
 
Is it possible that the WinXP one simply runs quickly enough the it never has time to fire the loading event?

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top