IHTMLXDomainRequest::timeout Property
Gets or sets the value of the timeout property.
Syntax
HRESULT IHTMLXDomainRequest::get_timeout(long *p);HRESULT IHTMLXDomainRequest::put_timeout(long v);
Parameters
- p
- Pointer to a variable of type long that receives the number of milliseconds the document waits for a server response.
- v
- long that specifies the number of milliseconds the document waits for a server response.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
Note The timeout property has a default of 0.The IHTMLXDomainRequest::responseText will be null, if the timeout period expires.
You should set the timeout to a value that is slightly longer than the response time you expect for the request.
Example
Setting the timeout property.
var xdr; xdr = new XDomainRequest(); xdr.timeout = 10000;
See Also