Microsoft XML Core Services (MSXML) 4.0 - DOM Reference

abort Method (ServerXMLHTTP/IServerXMLHTTPRequest)

Cancels the current HTTP request.

[Script]

Script Syntax

oServerXMLHttpRequest.abort();

Example

var xmlServerHttp;
xmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.4.0");
xmlServerHttp.onreadystatechange = doServerHttpReadyStateChange;
xmlServerHttp.open("GET", "http://localhost/sample.xml", true);
if (xmlDoc.parseError.errorCode <> 0) {
   var myErr = xmlDoc.parseError;
   alert("You have error " + myErr.reason);
} else {
   xmlServerHttp.send();
}

function doServerHttpReadyStateChange() {
   if (xmlServerHttp.readyState == 2) {
      xmlServerHttp.abort();
   }
}
[Visual Basic]

Visual Basic Syntax

oServerXMLHttpRequest.abort
[C/C++]

C/C++ Syntax

HRESULT abort(void);

C/C++ Return Values

S_OK
The value returned if successful.

Remarks

The object will be returned to the UNINITIALIZED state, and open method must be called next.

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

readyState Property (ServerXMLHTTP/IServerXMLHTTPRequest) | open Method (ServerXMLHTTP/IServerXMLHTTPRequest)

Applies to: IServerXMLHTTPRequest/ServerXMLHTTP

This HTML Help has been published using the chm2web software.