open Method (XDomainRequest, XDomainRequest Constructor)

Switch View :
ScriptFree
open Method

Creates a connection with a domain's server.

Syntax

object.open(bstrMethod, bstrUrl)

Parameters

bstrMethod One of the following required values:
GET
The HTTP GET method.
POST
The HTTP POST method.
bstrUrl Required. The server URL.

Return Value

No return value.

Remarks

Requires an XDomainRequest object.

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");     
                

Standards Information

There is no public standard that applies to this method.

Applies To

XDomainRequest, XDomainRequest Constructor

See Also

Community Content

pcx99
Doesn't support syncronous calls
Unlike traditional ajax open methods, this object doesn't support syncronous calls.



Vladimir Lichman
WebDAV requires PROPFIND, OPTIONS, PUT