Constructs an XML HTTP request.
Target URL of the request.
Form encoded parameters to send with a POST request.
String that specifies the request method. Possible values are POST and GET. Default is POST.
Boolean specifying if an asynchronous request should be used. Default is true.
String specifying the username to be used for the request.
String specifying the password to be used for the request.
Boolean indicating if the request is binary. This option is ignored in IE. In all other browsers the requested mime type is set to text/plain; charset=x-user-defined. Default is false.
Specifies if request values should be decoded as URIs before setting the textarea value in simulate. Defaults to false for backwards compatibility, to avoid another decode on the server this should be set to true.
Holds the inner, browser-specific request object.
Specifies if withCredentials should be used in HTML5-compliant browsers. Default is false.
Creates and returns the inner request object.
Returns the document element of the response XML document.
Returns the status as a number, eg. 404 for "Not found" or 200 for "OK". Note: The NS_ERROR_NOT_AVAILABLE for invalid responses cannot be cought.
Returns the response as a string.
Returns the response as an XML document. Use getDocumentElement to get the document element of the XML document.
Returns binary.
Returns true if the response is ready.
Send the
Note: Due to technical limitations, onerror is currently ignored.
Function to be invoked if a successful response was received.
Function to be called on any error. Unused in this implementation, intended for overriden function.
Optional timeout in ms before calling ontimeout.
Optional function to execute on timeout.
Sets binary.
Sets the headers for the given request and parameters. This sets the content-type to application/x-www-form-urlencoded if any params exist.
Creates and posts a request to the given target URL using a dynamically created form inside the given document.
Document that contains the form element.
Target to send the form result to.
Generated using TypeDoc
XML HTTP request wrapper. See also: mxUtils.get, mxUtils.post and mxUtils.load. This class provides a cross-browser abstraction for Ajax requests.
Encoding:
For encoding parameter values, the built-in encodeURIComponent JavaScript method must be used. For automatic encoding of post data in mxEditor the mxEditor.escapePostData switch can be set to true (default). The encoding will be carried out using the conte type of the page. That is, the page containting the editor should contain a meta tag in the header, eg.
Sends an asynchronous POST request to the specified URL.
Sends a synchronous POST request to the specified URL.
Sends an encoded graph model to the specified URL using xml as the parameter name. The parameter can then be retrieved in C# as follows:
(code) string xml = HttpUtility.UrlDecode(context.Request.Params["xml"]); (end)
Or in Java as follows:
(code) String xml = URLDecoder.decode(request.getParameter("xml"), "UTF-8").replace("\n", " "); (end)
Note that the linefeeds should only be replaced if the XML is processed in Java, for example when creating an image.