Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

create method

Creates a new XMLHttpRequest object.

Syntax


HRESULT retVal = object.create(p);

Parameters

p [out, retval]

Type: IHTMLXMLHttpRequest

Pointer to a variable of type IHTMLXMLHttpRequest that receives the new XMLHttpRequest.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

IHTMLXMLHttpRequestFactory::create was introduced in Windows Internet Explorer 7.

Examples

This method is called when the factory object is invoked with DISPID DISPATCH_CONSTRUCT in order to create and return an object supporting the IHTMLXMLHttpRequest interface. The actual method invocation is done implicitly when the "new" syntax is used or explicitly by calling it on the factory object. The following example demonstrates how this might be accomplished in script:


// Implicit create, with new
oXMLHttpRequest = new XMLHttpRequest();

// Explicit create, with factory object
factoryObj = window.XMLHttpRequest;
oXMLHttpRequest = factoryObj.create();

See also

XMLHttpRequest

 

 

Community Additions

Show:
© 2015 Microsoft