String specifying the message to be displayed.
Integer specifying the width of the window.
Optional boolean indicating whether to add a close button.
Optional icon for the window decoration.
Loads the specified URL asynchronously and invokes the given functions
depending on the request status. Returns the
Example:
mxUtils.get(url, (req)=>
{
let node = req.getDocumentElement();
// Process XML DOM...
});
So for example, to load a diagram into an existing graph model, the following code is used.
mxUtils.get(url, (req)=>
{
let node = req.getDocumentElement();
let dec = new Codec(node.ownerDocument);
dec.decode(node, graph.getDataModel());
});
URL to get the data from.
Optional function to execute for a successful response.
Optional function to execute on error.
Optional boolean parameter that specifies if the request is binary.
Optional timeout in ms before calling ontimeout.
Optional function to execute on timeout.
Optional with headers, eg. {'Authorization': 'token xyz'}
Loads the URLs in the given array asynchronously and invokes the given function if all requests returned with a valid 2xx status. The error handler is invoked once on the first error or invalid response.
Array of URLs to be loaded.
Callback with array of {@link XmlRequests}.
Optional function to execute on error.
Loads the specified URL synchronously and returns the
Example:
try
{
let req = mxUtils.load(filename);
let root = req.getDocumentElement();
// Process XML DOM...
}
catch (ex)
{
mxUtils.alert('Cannot load '+filename+': '+ex);
}
URL to get the data from.
Shows the specified text content in a new
String that specifies the text to be displayed.
Optional boolean indicating if an MaxWindow should be used instead of a new browser window. Default is false.
Posts the specified params to the given URL asynchronously and invokes
the given functions depending on the request status. Returns the
Example:
mxUtils.post(url, 'key=value', (req)=>
{
mxUtils.alert('Ready: '+req.isReady()+' Status: '+req.getStatus());
// Process req.getDocumentElement() using DOM API if OK...
});
URL to get the data from.
Parameters for the post request.
Optional function to execute for a successful response.
Optional function to execute on error.
Submits the given parameters to the specified URL using
<MaxXmlRequest.simulate> and returns the
URL to get the data from.
Parameters for the form.
Document to create the form in.
Target to send the form result to.
Generated using TypeDoc
Displays the given error message in a new of the given width.
If close is true then an additional close button is added to the window.
The optional icon specifies the icon to be used for the window. Default
is {@link Utils#errorImage}.