Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Hosting and Reuse
MSHTML Reference
IHTMLXDomainRequest

  Switch on low bandwidth view
IHTMLXDomainRequest Interface
New for Windows Internet Explorer 8

Implements cross-domain Asynchronous JavaScript and XML (AJAX) requests between the browser and a server.

IHTMLXDomainRequest Members

abort The abort method terminates a pending IHTMLXDomainRequest::send.
contentType Gets the Content-Type property in the HTML request or response header.
onerror Gets or sets the method to handle the onerror event.
onload Gets or sets the method to handle the onload event.
onprogress Gets or sets the method to handle the onprogress event.
ontimeout Gets or sets the method to handle the ontimout event.
open Creates a connection with a domain's server.
responseText Contains the body of the response returned by the server.
send Transmits a data string to the server for processing.
timeout Gets or sets the value of the timeout property.

Remarks

Cross-domain requests require mutual consent between the Web page and the server. You can initiate a cross-domain request by creating an XDomainRequest (XDR) object with the window object, and opening a connection to a URL. When sending the request, Internet Explorer 8 includes an XDomainRequest: 1 HTTP request header. The connection is completed only if the server responds with an XDomainRequestAllowed: 1 response header.

To use the XDR protocol, you first create an XDomainRequest object. Then you use the open method to establish a connection with a server. Once a connection is opened, the send method transmits data strings to the server for processing. For example:

  
// 1. Create XDR object 
xdr = new XDomainRequest(); 

// 2. Open connection with server using POST method
xdr.open("POST", "http://www.contoso.com/xdr.txt");

// 3. Send string data to server
xdr.send("data to be processed");     
                

For more information, see XDomainRequest.

Interface Information

Stock Implementationmshtml.dll
Custom ImplementationNo
Inherits from IDispatch
Header and IDL filesmshtml.h, mshtml.idl
Minimum availabilityInternet Explorer 8
Minimum operating systems Windows XP SP2

See Also

Introducing Cross-domain Request
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker