www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Properties
 timeout Property
timeout Property
New for Windows Internet Explorer 8
Note: This documentation is preliminary and is subject to change.

Gets or sets the time-out value.

Syntax

[ v = ] XMLHttpRequest.timeout [ = v ]

Possible Values

vInteger that specifies or receives the number of milliseconds that the browser is to wait for a server response.

The property is read/write. The property has a default value of 0.

Remarks

If the time-out period expires, the responseText property will be null.

You should set a time-out value that is slightly longer than the expected response time of the request.

The timeout property may be set only in the time interval between a call to the open method and the first call to the send method.

Example

The following example sets the timeout property.

var xhr;
xhr = new XMLHttpRequest();
xhr.timeout = 10000;

Standards Information

There is no public standard that applies to this property.

Applies To

XMLHttpRequest

See Also

IHTMLXMLHttpRequest2, XMLHttpRequest, IHTMLXDomainRequest, XDomainRequest
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG