Discussion:
Microsoft.XMLHTTP.send hangs...
(too old to reply)
lonelydog
2005-06-21 16:46:04 UTC
Permalink
the following code using Microsoft.XMLHTTP hangs while trying connecting to
hotmail. It seems that readyState never change to COMPLETED(4), but remains
INTERACTIVE(3). Connecting to other websites works perfectly.

var xmlhttp;
function loadXMLDoc(url)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp)
{
xmlhttp.onreadystatechange=xmlhttpChange;
xmlhttp.open("GET",url,false);
xmlhttp.send();
}
WScript.Echo(xmlhttp.responseText);
}
loadXMLDoc("http://www.hotmail.com/");
Martin Honnen
2005-06-21 17:36:18 UTC
Permalink
Post by lonelydog
the following code using Microsoft.XMLHTTP hangs while trying connecting to
hotmail. It seems that readyState never change to COMPLETED(4), but remains
INTERACTIVE(3). Connecting to other websites works perfectly.
var xmlhttp;
function loadXMLDoc(url)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp)
{
xmlhttp.onreadystatechange=xmlhttpChange;
xmlhttp.open("GET",url,false);
Does it help if you change the order of statements and do the open()
call first and only then set the onreadystatechange handler e.g.
xmlhttp.open("GET",url,false);
xmlhttp.onreadystatechange=xmlhttpChange;
?
On the other hand I have seen anyone do a synchronous request (e.g.
open(..., ..., false)) and then use an onreadystatechange handler.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
lonelydog
2005-06-22 09:37:02 UTC
Permalink
No. no change at all. Connecting to www.hotmail.com still hangs while
connecting to www.yahoo.com is successful.
Post by Martin Honnen
Post by lonelydog
the following code using Microsoft.XMLHTTP hangs while trying connecting to
hotmail. It seems that readyState never change to COMPLETED(4), but remains
INTERACTIVE(3). Connecting to other websites works perfectly.
var xmlhttp;
function loadXMLDoc(url)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp)
{
xmlhttp.onreadystatechange=xmlhttpChange;
xmlhttp.open("GET",url,false);
Does it help if you change the order of statements and do the open()
call first and only then set the onreadystatechange handler e.g.
xmlhttp.open("GET",url,false);
xmlhttp.onreadystatechange=xmlhttpChange;
?
On the other hand I have seen anyone do a synchronous request (e.g.
open(..., ..., false)) and then use an onreadystatechange handler.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
cybarber
2005-06-22 21:48:35 UTC
Permalink
In this HTML email message:
gmail loads after 5 sec
yahoo loads after 15sec
and hotmail loads after 25 sec
without problems on my side

--------------------------------------------------------------------------------

"lonelydog" <***@discussions.microsoft.com> schreef in bericht news:9EAB7C25-2FAF-4C21-9A6D-***@microsoft.com...
the following code using Microsoft.XMLHTTP hangs while trying connecting to
hotmail. It seems that readyState never change to COMPLETED(4), but remains
INTERACTIVE(3). Connecting to other websites works perfectly.

var xmlhttp;
function loadXMLDoc(url)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp)
{
xmlhttp.onreadystatechange=xmlhttpChange;
xmlhttp.open("GET",url,false);
xmlhttp.send();
}
WScript.Echo(xmlhttp.responseText);
}
loadXMLDoc("http://www.hotmail.com/");

Loading...