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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLHTTP, how to know if the server is down? 1

Status
Not open for further replies.

markask

Programmer
Joined
Apr 28, 2005
Messages
167
Location
GB
Hi,

When I use XMLHTTP (or XMLHTTPREQUEST) object to post/get information to/from my page in server, how to know if the server is down?

Thank you in advance.
 
When request timeout expires, XMLHTTP.Status will get HTTP status code - in this case 500 or something in 5xx class (server errors).

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Thank you.
Do I need to set the timeout for XMLHTTP and how?
 
AFAIK no - by default xmlhttp won't wait indefinitely.

And I'm not sure it can be set at all - unless you are using ServerXMLHTTP object.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Thank you for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top